summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/host.c6
-rw-r--r--drivers/scsi/isci/phy.c2
-rw-r--r--drivers/scsi/isci/port.c2
-rw-r--r--drivers/scsi/isci/port_config.c4
-rw-r--r--drivers/scsi/isci/remote_device.c30
-rw-r--r--drivers/scsi/isci/remote_device.h15
6 files changed, 7 insertions, 52 deletions
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index c108b5b940c3..6d2f4c831df7 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -958,7 +958,7 @@ static enum sci_status sci_controller_start_next_phy(struct isci_host *ihost)
static void phy_startup_timeout(struct timer_list *t)
{
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct isci_host *ihost = container_of(tmr, typeof(*ihost), phy_timer);
unsigned long flags;
enum sci_status status;
@@ -1592,7 +1592,7 @@ static const struct sci_base_state sci_controller_state_table[] = {
static void controller_timeout(struct timer_list *t)
{
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct isci_host *ihost = container_of(tmr, typeof(*ihost), timer);
struct sci_base_state_machine *sm = &ihost->sm;
unsigned long flags;
@@ -1737,7 +1737,7 @@ static u8 max_spin_up(struct isci_host *ihost)
static void power_control_timeout(struct timer_list *t)
{
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct isci_host *ihost = container_of(tmr, typeof(*ihost), power_control.timer);
struct isci_phy *iphy;
unsigned long flags;
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 743a3c64b0da..88237ec8b15f 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -317,7 +317,7 @@ sci_phy_link_layer_initialization(struct isci_phy *iphy,
static void phy_sata_timeout(struct timer_list *t)
{
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct isci_phy *iphy = container_of(tmr, typeof(*iphy), sata_timer);
struct isci_host *ihost = iphy->owning_port->owning_controller;
unsigned long flags;
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 1609aba1c9c1..10bd2aac2cb4 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -775,7 +775,7 @@ bool sci_port_link_detected(struct isci_port *iport, struct isci_phy *iphy)
static void port_timeout(struct timer_list *t)
{
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct isci_port *iport = container_of(tmr, typeof(*iport), timer);
struct isci_host *ihost = iport->owning_controller;
unsigned long flags;
diff --git a/drivers/scsi/isci/port_config.c b/drivers/scsi/isci/port_config.c
index c382a257b51b..3b4820defe63 100644
--- a/drivers/scsi/isci/port_config.c
+++ b/drivers/scsi/isci/port_config.c
@@ -321,7 +321,7 @@ sci_mpc_agent_validate_phy_configuration(struct isci_host *ihost,
static void mpc_agent_timeout(struct timer_list *t)
{
u8 index;
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct sci_port_configuration_agent *port_agent;
struct isci_host *ihost;
unsigned long flags;
@@ -659,7 +659,7 @@ static void sci_apc_agent_link_down(
static void apc_agent_timeout(struct timer_list *t)
{
u32 index;
- struct sci_timer *tmr = from_timer(tmr, t, timer);
+ struct sci_timer *tmr = timer_container_of(tmr, t, timer);
struct sci_port_configuration_agent *port_agent;
struct isci_host *ihost;
unsigned long flags;
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index 287e1ba8ddd7..82deb6a83a8c 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -392,36 +392,6 @@ enum sci_status sci_remote_device_stop(struct isci_remote_device *idev,
}
}
-enum sci_status sci_remote_device_reset(struct isci_remote_device *idev)
-{
- struct sci_base_state_machine *sm = &idev->sm;
- enum sci_remote_device_states state = sm->current_state_id;
-
- switch (state) {
- case SCI_DEV_INITIAL:
- case SCI_DEV_STOPPED:
- case SCI_DEV_STARTING:
- case SCI_SMP_DEV_IDLE:
- case SCI_SMP_DEV_CMD:
- case SCI_DEV_STOPPING:
- case SCI_DEV_FAILED:
- case SCI_DEV_RESETTING:
- case SCI_DEV_FINAL:
- default:
- dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %s\n",
- __func__, dev_state_name(state));
- return SCI_FAILURE_INVALID_STATE;
- case SCI_DEV_READY:
- case SCI_STP_DEV_IDLE:
- case SCI_STP_DEV_CMD:
- case SCI_STP_DEV_NCQ:
- case SCI_STP_DEV_NCQ_ERROR:
- case SCI_STP_DEV_AWAIT_RESET:
- sci_change_state(sm, SCI_DEV_RESETTING);
- return SCI_SUCCESS;
- }
-}
-
enum sci_status sci_remote_device_frame_handler(struct isci_remote_device *idev,
u32 frame_index)
{
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index 561ae3f2cbbd..c1fdf45751cd 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -160,21 +160,6 @@ enum sci_status sci_remote_device_stop(
u32 timeout);
/**
- * sci_remote_device_reset() - This method will reset the device making it
- * ready for operation. This method must be called anytime the device is
- * reset either through a SMP phy control or a port hard reset request.
- * @remote_device: This parameter specifies the device to be reset.
- *
- * This method does not actually cause the device hardware to be reset. This
- * method resets the software object so that it will be operational after a
- * device hardware reset completes. An indication of whether the device reset
- * was accepted. SCI_SUCCESS This value is returned if the device reset is
- * started.
- */
-enum sci_status sci_remote_device_reset(
- struct isci_remote_device *idev);
-
-/**
* enum sci_remote_device_states - This enumeration depicts all the states
* for the common remote device state machine.
* @SCI_DEV_INITIAL: Simply the initial state for the base remote device