summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/events.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-03-04 12:10:29 -0800
committerDan Williams <dan.j.williams@intel.com>2011-07-03 03:55:29 -0700
commit6ad31fec306d532031b2f778f8656385df1b9d8f (patch)
treec23640084d82b5ff534fe837300ac64d3a92143e /drivers/scsi/isci/events.c
parent8acaec1593526f922ff46812d99abf9aab5c8b43 (diff)
downloadop-kernel-dev-6ad31fec306d532031b2f778f8656385df1b9d8f.zip
op-kernel-dev-6ad31fec306d532031b2f778f8656385df1b9d8f.tar.gz
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/events.c')
-rw-r--r--drivers/scsi/isci/events.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/scsi/isci/events.c b/drivers/scsi/isci/events.c
index c5cbaed..9d58e45 100644
--- a/drivers/scsi/isci/events.c
+++ b/drivers/scsi/isci/events.c
@@ -526,7 +526,7 @@ void isci_event_remote_device_start_complete(
/**
* isci_event_remote_device_stop_complete() - This user callback method will
* inform the user that a stop operation has completed.
- * @controller: This parameter specifies the core controller associated with
+ * @scic: This parameter specifies the core controller associated with
* the completion callback.
* @remote_device: This parameter specifies the remote device associated with
* the completion callback.
@@ -534,28 +534,20 @@ void isci_event_remote_device_start_complete(
* operation.
*
*/
-void isci_event_remote_device_stop_complete(
- struct scic_sds_controller *controller,
- struct scic_sds_remote_device *remote_device,
- enum sci_status completion_status)
+void isci_event_remote_device_stop_complete(struct scic_sds_controller *scic,
+ struct scic_sds_remote_device *sci_dev,
+ enum sci_status completion_status)
{
- struct isci_host *isci_host;
- struct isci_remote_device *isci_device;
+ struct isci_host *ihost;
+ struct isci_remote_device *idev;
- isci_host =
- (struct isci_host *)sci_object_get_association(controller);
+ ihost = sci_object_get_association(scic);
+ idev = sci_object_get_association(sci_dev);
- isci_device =
- (struct isci_remote_device *)sci_object_get_association(
- remote_device
- );
-
- dev_dbg(&isci_host->pdev->dev,
- "%s: isci_device = %p\n", __func__, isci_device);
-
- isci_remote_device_stop_complete(
- isci_host, isci_device, completion_status);
+ dev_dbg(&ihost->pdev->dev,
+ "%s: idev = %p\n", __func__, idev);
+ isci_remote_device_stop_complete(ihost, idev, completion_status);
}
/**
OpenPOWER on IntegriCloud