aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-03-31 16:10:38 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:00:36 -0400
commit26e953bc6ec11c9e81ad8e9a59b14cf260776007 (patch)
tree6343ea2be3abad57db5cc318029497fedbb8d581 /drivers/scsi
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>
Diffstat (limited to 'drivers/scsi')
-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(
301 int ret = TMF_RESP_FUNC_FAILED; 301 int ret = TMF_RESP_FUNC_FAILED;
302 unsigned long flags; 302 unsigned long flags;
303 303
304 /* Send the initial SRST to the target */ 304 /* Send the soft reset to the target */
305 #define ISCI_SRST_TIMEOUT_MS 20 /* 20 ms timeout. */ 305 #define ISCI_SRST_TIMEOUT_MS 25000 /* 25 second timeout. */
306 isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_high, 306 isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_high,
307 NULL, NULL 307 NULL, NULL
308 ); 308 );
@@ -319,38 +319,6 @@ int isci_task_send_lu_reset_sata(
319 /* Return the failure so that the LUN reset is escalated 319 /* Return the failure so that the LUN reset is escalated
320 * to a target reset. 320 * to a target reset.
321 */ 321 */
322 goto out;
323 } 322 }
324
325 /* Leave SRST high for a bit. */
326 #define ISCI_SRST_ASSERT_DELAY 100 /* usecs */
327 udelay(ISCI_SRST_ASSERT_DELAY);
328
329 /* Deassert SRST. */
330 isci_task_build_tmf(&tmf, isci_device, isci_tmf_sata_srst_low,
331 NULL, NULL
332 );
333 ret = isci_task_execute_tmf(isci_host, &tmf, ISCI_SRST_TIMEOUT_MS);
334
335 if (ret == TMF_RESP_FUNC_COMPLETE)
336 dev_dbg(&isci_host->pdev->dev,
337 "%s: SATA LUN reset passed (%p)\n",
338 __func__,
339 isci_device);
340 else
341 dev_warn(&isci_host->pdev->dev,
342 "%s: Deassert SRST failed (%p)=%x\n",
343 __func__,
344 isci_device,
345 ret);
346
347 out:
348 spin_lock_irqsave(&isci_host->scic_lock, flags);
349
350 /* Resume the device. */
351 scic_sds_remote_device_resume(to_sci_dev(isci_device));
352
353 spin_unlock_irqrestore(&isci_host->scic_lock, flags);
354
355 return ret; 323 return ret;
356} 324}