summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-03-31 13:10:38 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:00:36 -0700
commit26e953bc6ec11c9e81ad8e9a59b14cf260776007 (patch)
tree6343ea2be3abad57db5cc318029497fedbb8d581
parentce4f75def3999fbe454da9aa733ed322bc671b06 (diff)
isci: Fix use of SATA soft reset state machine.
The driver SATA LUN reset function incorrectly sent an SRST deassert FIS, which is unnecessary because the core initiates the entire SATA soft reset state machine from the assert request. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/scsi/isci/sata.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/drivers/scsi/isci/sata.c b/drivers/scsi/isci/sata.c
index 7a1b58600ca0..794ab7ca9f1a 100644
--- a/drivers/scsi/isci/sata.c
+++ b/drivers/scsi/isci/sata.c
@@ -301,8 +301,8 @@ int isci_task_send_lu_reset_sata(
int ret = TMF_RESP_FUNC_FAILED;
unsigned long flags;
- /* Send the initial SRST to the target */
- #define ISCI_SRST_TIMEOUT_MS 20 /* 20 ms timeout. */
+ /* Send the soft reset to the target */
+ #define ISCI_SRST_TIMEOUT_MS 25000 /* 25 second timeout. */
isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_high,
NULL, NULL
);
@@ -319,38 +319,6 @@ int isci_task_send_lu_reset_sata(
/* Return the failure so that the LUN reset is escalated
* to a target reset.
*/
- goto out;
}
-
- /* Leave SRST high for a bit. */
- #define ISCI_SRST_ASSERT_DELAY 100 /* usecs */
- udelay(ISCI_SRST_ASSERT_DELAY);
-
- /* Deassert SRST. */
- isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_low,
- NULL, NULL
- );
- ret = isci_task_execute_tmf(isci_host, &tmf, ISCI_SRST_TIMEOUT_MS);
-
- if (ret == TMF_RESP_FUNC_COMPLETE)
- dev_dbg(&isci_host->pdev->dev,
- "%s: SATA LUN reset passed (%p)\n",
- __func__,
- isci_device);
- else
- dev_warn(&isci_host->pdev->dev,
- "%s: Deassert SRST failed (%p)=%x\n",
- __func__,
- isci_device,
- ret);
-
- out:
- spin_lock_irqsave(&isci_host->scic_lock, flags);
-
- /* Resume the device. */
- scic_sds_remote_device_resume(to_sci_dev(isci_device));
-
- spin_unlock_irqrestore(&isci_host->scic_lock, flags);
-
return ret;
}