aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/isci')
-rw-r--r--drivers/scsi/isci/remote_device.c17
-rw-r--r--drivers/scsi/isci/remote_device.h8
-rw-r--r--drivers/scsi/isci/remote_node_context.c3
3 files changed, 20 insertions, 8 deletions
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index 1a85e9edef6a..86aca11120f3 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -1520,3 +1520,20 @@ enum sci_status isci_remote_device_reset_complete(
1520 return status; 1520 return status;
1521} 1521}
1522 1522
1523void isci_dev_set_hang_detection_timeout(
1524 struct isci_remote_device *idev,
1525 u32 timeout)
1526{
1527 if (dev_is_sata(idev->domain_dev)) {
1528 if (timeout) {
1529 if (test_and_set_bit(IDEV_RNC_LLHANG_ENABLED,
1530 &idev->flags))
1531 return; /* Already enabled. */
1532 } else if (!test_and_clear_bit(IDEV_RNC_LLHANG_ENABLED,
1533 &idev->flags))
1534 return; /* Not enabled. */
1535
1536 sci_port_set_hang_detection_timeout(idev->owning_port,
1537 timeout);
1538 }
1539}
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index 8b7817cf4352..ef563e5360a3 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -85,6 +85,7 @@ struct isci_remote_device {
85 #define IDEV_GONE 3 85 #define IDEV_GONE 3
86 #define IDEV_IO_READY 4 86 #define IDEV_IO_READY 4
87 #define IDEV_IO_NCQERROR 5 87 #define IDEV_IO_NCQERROR 5
88 #define IDEV_RNC_LLHANG_ENABLED 6
88 unsigned long flags; 89 unsigned long flags;
89 struct kref kref; 90 struct kref kref;
90 struct isci_port *isci_port; 91 struct isci_port *isci_port;
@@ -308,12 +309,7 @@ static inline void sci_remote_device_decrement_request_count(struct isci_remote_
308 idev->started_request_count--; 309 idev->started_request_count--;
309} 310}
310 311
311static inline void isci_dev_set_hang_detection_timeout( 312void isci_dev_set_hang_detection_timeout(struct isci_remote_device *idev, u32 timeout);
312 struct isci_remote_device *idev,
313 u32 timeout)
314{
315 sci_port_set_hang_detection_timeout(idev->owning_port, timeout);
316}
317 313
318enum sci_status sci_remote_device_frame_handler( 314enum sci_status sci_remote_device_frame_handler(
319 struct isci_remote_device *idev, 315 struct isci_remote_device *idev,
diff --git a/drivers/scsi/isci/remote_node_context.c b/drivers/scsi/isci/remote_node_context.c
index 2ac92608cc2d..48565de50016 100644
--- a/drivers/scsi/isci/remote_node_context.c
+++ b/drivers/scsi/isci/remote_node_context.c
@@ -615,8 +615,7 @@ enum sci_status sci_remote_node_context_suspend(
615 if ((suspend_reason == SCI_SW_SUSPEND_NORMAL) || 615 if ((suspend_reason == SCI_SW_SUSPEND_NORMAL) ||
616 (suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)) { 616 (suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)) {
617 617
618 if ((suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT) 618 if (suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)
619 && dev_is_sata(idev->domain_dev))
620 isci_dev_set_hang_detection_timeout(idev, 0x00000001); 619 isci_dev_set_hang_detection_timeout(idev, 0x00000001);
621 620
622 sci_remote_device_post_request( 621 sci_remote_device_post_request(