summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/remote_device.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-04 20:10:29 (GMT)
committerDan Williams <dan.j.williams@intel.com>2011-07-03 10:55:29 (GMT)
commit6ad31fec306d532031b2f778f8656385df1b9d8f (patch)
treec23640084d82b5ff534fe837300ac64d3a92143e /drivers/scsi/isci/remote_device.h
parent8acaec1593526f922ff46812d99abf9aab5c8b43 (diff)
downloadlinux-fsl-qoriq-6ad31fec306d532031b2f778f8656385df1b9d8f.tar.xz
isci: replace isci_remote_device completion with event queue
Replace the device completion infrastructure with the controller wide event queue. There was a potential for the stop and ready notifications to corrupt each other, now that cannot happen. The stop pending flag cannot be used until devices are statically allocated. We temporarily need to maintain a completion to handle waiting for an object that has disappeared, but we can at least stop scribbling on freed memory. A future change will also get rid of the "stopping" state as it should not be exposed to the rest of the driver. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/remote_device.h')
-rw-r--r--drivers/scsi/isci/remote_device.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index af03039..3c22137 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -61,12 +61,14 @@ struct scic_sds_remote_device;
struct isci_remote_device {
enum isci_status status;
+ #define IDEV_START_PENDING 0
+ #define IDEV_STOP_PENDING 1
+ unsigned long flags;
+ struct completion *cmp;
struct isci_port *isci_port;
struct domain_device *domain_dev;
- struct completion *completion;
struct list_head node;
struct list_head reqs_in_process;
- struct work_struct stop_work;
spinlock_t state_lock;
};
@@ -102,9 +104,8 @@ void isci_remote_device_stop_complete(
struct isci_remote_device *,
enum sci_status);
-enum sci_status isci_remote_device_stop(
- struct isci_remote_device *isci_device);
-
+enum sci_status isci_remote_device_stop(struct isci_host *ihost,
+ struct isci_remote_device *idev);
void isci_remote_device_nuke_requests(
struct isci_remote_device *isci_device);