aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-17 16:34:43 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:51 -0400
commitff60639dc9a461883db9192d2da0674a00339f12 (patch)
tree5d4e8b51ae522b89240e332054f031cee4515c87 /drivers
parentf2088267514b39af1a94409168101527769a911c (diff)
isci: kill device_sequence
Now that we have upleveled device reassignment protection to the isci_remote_device reference count we no longer need this level of self-defense. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/host.h9
-rw-r--r--drivers/scsi/isci/remote_device.c2
-rw-r--r--drivers/scsi/isci/remote_device.h11
-rw-r--r--drivers/scsi/isci/request.c5
-rw-r--r--drivers/scsi/isci/request.h9
5 files changed, 0 insertions, 36 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index 94fd54dc9f01..a54397e1bf16 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -188,15 +188,6 @@ struct scic_sds_controller {
188 u8 io_request_sequence[SCI_MAX_IO_REQUESTS]; 188 u8 io_request_sequence[SCI_MAX_IO_REQUESTS];
189 189
190 /** 190 /**
191 * This field in the array of sequence values for the RNi. These are used
192 * to control io request build to io request start operations. The sequence
193 * value is recorded into an io request when it is built and is checked on
194 * the io request start operation to make sure that there was not a device
195 * hot plug between the build and start operation.
196 */
197 u8 remote_device_sequence[SCI_MAX_REMOTE_DEVICES];
198
199 /**
200 * This field is a pointer to the memory allocated by the driver for the task 191 * This field is a pointer to the memory allocated by the driver for the task
201 * context table. This data is shared between the hardware and software. 192 * context table. This data is shared between the hardware and software.
202 */ 193 */
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index c2e5c05be0cb..9f45c2ba7307 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -887,8 +887,6 @@ static void scic_sds_remote_device_ready_state_enter(struct sci_base_state_machi
887 struct isci_remote_device *idev = sci_dev_to_idev(sci_dev); 887 struct isci_remote_device *idev = sci_dev_to_idev(sci_dev);
888 struct domain_device *dev = idev->domain_dev; 888 struct domain_device *dev = idev->domain_dev;
889 889
890 scic->remote_device_sequence[sci_dev->rnc.remote_node_index]++;
891
892 if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_SATA)) { 890 if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_SATA)) {
893 sci_change_state(&sci_dev->sm, SCI_STP_DEV_IDLE); 891 sci_change_state(&sci_dev->sm, SCI_STP_DEV_IDLE);
894 } else if (dev_is_expander(dev)) { 892 } else if (dev_is_expander(dev)) {
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index 33f011447312..cde595078f6d 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -411,17 +411,6 @@ static inline bool dev_is_expander(struct domain_device *dev)
411 ((sci_dev)->owning_port) 411 ((sci_dev)->owning_port)
412 412
413/** 413/**
414 * scic_sds_remote_device_get_sequence() -
415 *
416 * This macro returns the remote device sequence value
417 */
418#define scic_sds_remote_device_get_sequence(sci_dev) \
419 (\
420 scic_sds_remote_device_get_controller(sci_dev)-> \
421 remote_device_sequence[(sci_dev)->rnc.remote_node_index] \
422 )
423
424/**
425 * scic_sds_remote_device_get_controller_peg() - 414 * scic_sds_remote_device_get_controller_peg() -
426 * 415 *
427 * This macro returns the controllers protocol engine group 416 * This macro returns the controllers protocol engine group
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index fd6314abeb0b..ebe160c83f91 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -753,10 +753,6 @@ enum sci_status scic_sds_request_start(struct scic_sds_request *sci_req)
753 struct scu_task_context *task_context; 753 struct scu_task_context *task_context;
754 enum sci_base_request_states state; 754 enum sci_base_request_states state;
755 755
756 if (sci_req->device_sequence !=
757 scic_sds_remote_device_get_sequence(sci_req->target_device))
758 return SCI_FAILURE;
759
760 state = sci_req->sm.current_state_id; 756 state = sci_req->sm.current_state_id;
761 if (state != SCI_REQ_CONSTRUCTED) { 757 if (state != SCI_REQ_CONSTRUCTED) {
762 dev_warn(scic_to_dev(scic), 758 dev_warn(scic_to_dev(scic),
@@ -3112,7 +3108,6 @@ scic_sds_general_request_construct(struct scic_sds_controller *scic,
3112 sci_req->target_device = sci_dev; 3108 sci_req->target_device = sci_dev;
3113 sci_req->protocol = SCIC_NO_PROTOCOL; 3109 sci_req->protocol = SCIC_NO_PROTOCOL;
3114 sci_req->saved_rx_frame_index = SCU_INVALID_FRAME_INDEX; 3110 sci_req->saved_rx_frame_index = SCU_INVALID_FRAME_INDEX;
3115 sci_req->device_sequence = scic_sds_remote_device_get_sequence(sci_dev);
3116 3111
3117 sci_req->sci_status = SCI_SUCCESS; 3112 sci_req->sci_status = SCI_SUCCESS;
3118 sci_req->scu_status = 0; 3113 sci_req->scu_status = 0;
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 9bb7c36257f3..a91d1d6060ce 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -231,14 +231,6 @@ struct scic_sds_request {
231 */ 231 */
232 u32 saved_rx_frame_index; 232 u32 saved_rx_frame_index;
233 233
234 /*
235 * This field in the recorded device sequence for the io request.
236 * This is recorded during the build operation and is compared in the
237 * start operation. If the sequence is different then there was a
238 * change of devices from the build to start operations.
239 */
240 u8 device_sequence;
241
242 union { 234 union {
243 struct { 235 struct {
244 union { 236 union {
@@ -262,7 +254,6 @@ struct scic_sds_request {
262 struct dev_to_host_fis rsp; 254 struct dev_to_host_fis rsp;
263 } stp; 255 } stp;
264 }; 256 };
265
266}; 257};
267 258
268static inline struct scic_sds_request *to_sci_req(struct scic_sds_stp_request *stp_req) 259static inline struct scic_sds_request *to_sci_req(struct scic_sds_stp_request *stp_req)