Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302567
b: refs/heads/master
c: 9608b64
h: refs/heads/master
i:
  302565: 0be7f51
  302563: c970ccd
  302559: 75b6042
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed May 17, 2012
1 parent 3f0833c commit 46c658d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 447bfbcee070a0b43dd6abc743063d7a02fe65ca
refs/heads/master: 9608b6408e637abeec101abb6aebd3343f0ebac4
17 changes: 17 additions & 0 deletions trunk/drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,3 +1520,20 @@ enum sci_status isci_remote_device_reset_complete(
return status;
}

void isci_dev_set_hang_detection_timeout(
struct isci_remote_device *idev,
u32 timeout)
{
if (dev_is_sata(idev->domain_dev)) {
if (timeout) {
if (test_and_set_bit(IDEV_RNC_LLHANG_ENABLED,
&idev->flags))
return; /* Already enabled. */
} else if (!test_and_clear_bit(IDEV_RNC_LLHANG_ENABLED,
&idev->flags))
return; /* Not enabled. */

sci_port_set_hang_detection_timeout(idev->owning_port,
timeout);
}
}
8 changes: 2 additions & 6 deletions trunk/drivers/scsi/isci/remote_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ struct isci_remote_device {
#define IDEV_GONE 3
#define IDEV_IO_READY 4
#define IDEV_IO_NCQERROR 5
#define IDEV_RNC_LLHANG_ENABLED 6
unsigned long flags;
struct kref kref;
struct isci_port *isci_port;
Expand Down Expand Up @@ -308,12 +309,7 @@ static inline void sci_remote_device_decrement_request_count(struct isci_remote_
idev->started_request_count--;
}

static inline void isci_dev_set_hang_detection_timeout(
struct isci_remote_device *idev,
u32 timeout)
{
sci_port_set_hang_detection_timeout(idev->owning_port, timeout);
}
void isci_dev_set_hang_detection_timeout(struct isci_remote_device *idev, u32 timeout);

enum sci_status sci_remote_device_frame_handler(
struct isci_remote_device *idev,
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/isci/remote_node_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,7 @@ enum sci_status sci_remote_node_context_suspend(
if ((suspend_reason == SCI_SW_SUSPEND_NORMAL) ||
(suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)) {

if ((suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)
&& dev_is_sata(idev->domain_dev))
if (suspend_reason == SCI_SW_SUSPEND_LINKHANG_DETECT)
isci_dev_set_hang_detection_timeout(idev, 0x00000001);

sci_remote_device_post_request(
Expand Down

0 comments on commit 46c658d

Please sign in to comment.