Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302577
b: refs/heads/master
c: 8c73188
h: refs/heads/master
i:
  302575: 51d8bc3
v: v3
  • Loading branch information
Jeff Skirvin authored and Dan Williams committed May 17, 2012
1 parent a4a0ea5 commit c2e7461
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 12 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: 28de92bef0fb0c3953aa73d31a961422ef900e6a
refs/heads/master: 8c731888bf1be8d15d587ab1b4da80553302e653
58 changes: 51 additions & 7 deletions trunk/drivers/scsi/isci/remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,67 @@ enum sci_status isci_remote_device_terminate_requests(
"about to wait\n",
__func__, idev, ireq, idev->started_request_count,
rnc_suspend_count, idev->rnc.suspend_count);

#define MAX_SUSPEND_MSECS 10000
if (ireq) {
/* Terminate a specific TC. */
set_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags);
sci_remote_device_terminate_req(ihost, idev, 0, ireq);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
wait_event(ihost->eventq,
isci_check_reqterm(ihost, idev, ireq,
rnc_suspend_count));
if (!wait_event_timeout(ihost->eventq,
isci_check_reqterm(ihost, idev, ireq,
rnc_suspend_count),
msecs_to_jiffies(MAX_SUSPEND_MSECS))) {

dev_warn(&ihost->pdev->dev, "%s host%d timeout single\n",
__func__, ihost->id);
dev_dbg(&ihost->pdev->dev,
"%s: ******* Timeout waiting for "
"suspend; idev=%p, current state %s; "
"started_request_count=%d, flags=%lx\n\t"
"rnc_suspend_count=%d, rnc.suspend_count=%d "
"RNC: current state %s, current "
"suspend_type %x dest state %d;\n"
"ireq=%p, ireq->flags = %lx\n",
__func__, idev,
dev_state_name(idev->sm.current_state_id),
idev->started_request_count, idev->flags,
rnc_suspend_count, idev->rnc.suspend_count,
rnc_state_name(idev->rnc.sm.current_state_id),
idev->rnc.suspend_type,
idev->rnc.destination_state,
ireq, ireq->flags);
}
clear_bit(IREQ_NO_AUTO_FREE_TAG, &ireq->flags);
isci_free_tag(ihost, ireq->io_tag);
} else {
/* Terminate all TCs. */
sci_remote_device_terminate_requests(idev);
spin_unlock_irqrestore(&ihost->scic_lock, flags);
wait_event(ihost->eventq,
isci_check_devempty(ihost, idev,
rnc_suspend_count));
if (!wait_event_timeout(ihost->eventq,
isci_check_devempty(ihost, idev,
rnc_suspend_count),
msecs_to_jiffies(MAX_SUSPEND_MSECS))) {

dev_warn(&ihost->pdev->dev, "%s host%d timeout all\n",
__func__, ihost->id);
dev_dbg(&ihost->pdev->dev,
"%s: ******* Timeout waiting for "
"suspend; idev=%p, current state %s; "
"started_request_count=%d, flags=%lx\n\t"
"rnc_suspend_count=%d, "
"RNC: current state %s, "
"rnc.suspend_count=%d, current "
"suspend_type %x dest state %d\n",
__func__, idev,
dev_state_name(idev->sm.current_state_id),
idev->started_request_count, idev->flags,
rnc_suspend_count,
rnc_state_name(idev->rnc.sm.current_state_id),
idev->rnc.suspend_count,
idev->rnc.suspend_type,
idev->rnc.destination_state);
}
}
dev_dbg(&ihost->pdev->dev, "%s: idev=%p, wait done\n",
__func__, idev);
Expand Down Expand Up @@ -1315,7 +1359,7 @@ void isci_remote_device_wait_for_resume_from_abort(
dev_dbg(scirdev_to_dev(idev), "%s: starting resume wait: %p\n",
__func__, idev);

#define MAX_RESUME_MSECS 5
#define MAX_RESUME_MSECS 10000
if (!wait_event_timeout(ihost->eventq,
(!test_bit(IDEV_ABORT_PATH_RESUME_PENDING,
&idev->flags)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/scsi/isci/remote_node_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ enum sci_status sci_remote_node_context_event_handler(struct sci_remote_node_con
case SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX:
/* We really dont care if the hardware is going to suspend
* the device since it's being invalidated anyway */
dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)),
dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
"%s: SCIC Remote Node Context 0x%p was "
"suspeneded by hardware while being "
"invalidated.\n", __func__, sci_rnc);
Expand All @@ -464,7 +464,7 @@ enum sci_status sci_remote_node_context_event_handler(struct sci_remote_node_con
case SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX:
/* We really dont care if the hardware is going to suspend
* the device since it's being resumed anyway */
dev_dbg(scirdev_to_dev(rnc_to_dev(sci_rnc)),
dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)),
"%s: SCIC Remote Node Context 0x%p was "
"suspeneded by hardware while being resumed.\n",
__func__, sci_rnc);
Expand Down Expand Up @@ -568,9 +568,9 @@ enum sci_status sci_remote_node_context_suspend(
RNC_DEST_UNSPECIFIED;

dev_dbg(scirdev_to_dev(idev),
"%s: current state %d, current suspend_type %x dest state %d,"
"%s: current state %s, current suspend_type %x dest state %d,"
" arg suspend_reason %d, arg suspend_type %x",
__func__, state, sci_rnc->suspend_type,
__func__, rnc_state_name(state), sci_rnc->suspend_type,
sci_rnc->destination_state, suspend_reason,
suspend_type);

Expand Down

0 comments on commit c2e7461

Please sign in to comment.