summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/remote_device.h
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2012-03-08 22:41:51 -0800
committerDan Williams <dan.j.williams@intel.com>2012-05-17 14:33:37 -0700
commit5b6bf225e7fc249c703e19bf2c983d1a59178874 (patch)
tree9c9b855474b77323c0d89b33ac224e0c1f016c73 /drivers/scsi/isci/remote_device.h
parent726980d56908f2e230624394f03743689db3110c (diff)
isci: Manage device suspensions during TC terminations.
TCs must be terminated only while the RNC is suspended. This commit adds remote device suspensions and resumptions in the abort, reset and termination paths. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> 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.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index ae508ee3366..a6a376e200e 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -106,6 +106,16 @@ struct isci_remote_device {
#define ISCI_REMOTE_DEVICE_START_TIMEOUT 5000
/* device reference routines must be called under sci_lock */
+static inline struct isci_remote_device *isci_get_device(
+ struct domain_device *dev)
+{
+ struct isci_remote_device *idev = dev->lldd_dev;
+
+ if (idev)
+ kref_get(&idev->kref);
+ return idev;
+}
+
static inline struct isci_remote_device *isci_lookup_device(struct domain_device *dev)
{
struct isci_remote_device *idev = dev->lldd_dev;
@@ -345,4 +355,27 @@ int isci_remote_device_is_safe_to_abort(
enum sci_status
sci_remote_device_abort_requests_pending_abort(
struct isci_remote_device *idev);
+
+enum sci_status isci_remote_device_suspend(
+ struct isci_host *ihost,
+ struct isci_remote_device *idev);
+
+enum sci_status sci_remote_device_resume(
+ struct isci_remote_device *idev,
+ scics_sds_remote_node_context_callback cb_fn,
+ void *cb_p);
+
+enum sci_status isci_remote_device_resume(
+ struct isci_host *ihost,
+ struct isci_remote_device *idev,
+ scics_sds_remote_node_context_callback cb_fn,
+ void *cb_p);
+
+enum sci_status isci_remote_device_reset(
+ struct isci_host *ihost,
+ struct isci_remote_device *idev);
+
+enum sci_status isci_remote_device_reset_complete(
+ struct isci_host *ihost,
+ struct isci_remote_device *idev);
#endif /* !defined(_ISCI_REMOTE_DEVICE_H_) */