summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-06-20 14:09:26 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:50 -0700
commitfd0527ab15bfd96f04b084b1b2550f80cf151b60 (patch)
tree09aa91b2f990da3145c025343a865c3a59524611 /drivers/scsi/isci
parentfd53660120b5eda06539225de56755dc389a4e64 (diff)
isci: Hard reset failure will link reset all phys in the port
In the case where the hard reset process fails, each link in the port is put through a link reset sequence. 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/isci')
-rw-r--r--drivers/scsi/isci/port.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 2946eee8e70..e540281ebd4 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -1916,7 +1916,7 @@ int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *ipor
{
unsigned long flags;
enum sci_status status;
- int ret = TMF_RESP_FUNC_COMPLETE;
+ int idx, ret = TMF_RESP_FUNC_COMPLETE;
dev_dbg(&ihost->pdev->dev, "%s: iport = %p\n",
__func__, iport);
@@ -1953,14 +1953,26 @@ int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *ipor
* the same as link failures on all phys in the port.
*/
if (ret != TMF_RESP_FUNC_COMPLETE) {
+
dev_err(&ihost->pdev->dev,
"%s: iport = %p; hard reset failed "
- "(0x%x) - sending link down to libsas for phy %p\n",
- __func__, iport, iport->hard_reset_status, iphy);
+ "(0x%x) - driving explicit link fail for all phys\n",
+ __func__, iport, iport->hard_reset_status);
- isci_port_link_down(ihost, iphy, iport);
- }
+ /* Down all phys in the port. */
+ spin_lock_irqsave(&ihost->scic_lock, flags);
+ for (idx = 0; idx < SCI_MAX_PHYS; ++idx) {
+
+ if (iport->sci.phy_table[idx] != NULL) {
+ scic_sds_phy_stop(
+ iport->sci.phy_table[idx]);
+ scic_sds_phy_start(
+ iport->sci.phy_table[idx]);
+ }
+ }
+ spin_unlock_irqrestore(&ihost->scic_lock, flags);
+ }
return ret;
}