diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-06-20 17:09:26 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:50 -0400 |
commit | fd0527ab15bfd96f04b084b1b2550f80cf151b60 (patch) | |
tree | 09aa91b2f990da3145c025343a865c3a59524611 /drivers/scsi/isci/port.c | |
parent | fd53660120b5eda06539225de56755dc389a4e64 (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/port.c')
-rw-r--r-- | drivers/scsi/isci/port.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index 2946eee8e702..e540281ebd49 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 | |||
1916 | { | 1916 | { |
1917 | unsigned long flags; | 1917 | unsigned long flags; |
1918 | enum sci_status status; | 1918 | enum sci_status status; |
1919 | int ret = TMF_RESP_FUNC_COMPLETE; | 1919 | int idx, ret = TMF_RESP_FUNC_COMPLETE; |
1920 | 1920 | ||
1921 | dev_dbg(&ihost->pdev->dev, "%s: iport = %p\n", | 1921 | dev_dbg(&ihost->pdev->dev, "%s: iport = %p\n", |
1922 | __func__, iport); | 1922 | __func__, iport); |
@@ -1953,14 +1953,26 @@ int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *ipor | |||
1953 | * the same as link failures on all phys in the port. | 1953 | * the same as link failures on all phys in the port. |
1954 | */ | 1954 | */ |
1955 | if (ret != TMF_RESP_FUNC_COMPLETE) { | 1955 | if (ret != TMF_RESP_FUNC_COMPLETE) { |
1956 | |||
1956 | dev_err(&ihost->pdev->dev, | 1957 | dev_err(&ihost->pdev->dev, |
1957 | "%s: iport = %p; hard reset failed " | 1958 | "%s: iport = %p; hard reset failed " |
1958 | "(0x%x) - sending link down to libsas for phy %p\n", | 1959 | "(0x%x) - driving explicit link fail for all phys\n", |
1959 | __func__, iport, iport->hard_reset_status, iphy); | 1960 | __func__, iport, iport->hard_reset_status); |
1960 | 1961 | ||
1961 | isci_port_link_down(ihost, iphy, iport); | 1962 | /* Down all phys in the port. */ |
1962 | } | 1963 | spin_lock_irqsave(&ihost->scic_lock, flags); |
1964 | for (idx = 0; idx < SCI_MAX_PHYS; ++idx) { | ||
1965 | |||
1966 | if (iport->sci.phy_table[idx] != NULL) { | ||
1963 | 1967 | ||
1968 | scic_sds_phy_stop( | ||
1969 | iport->sci.phy_table[idx]); | ||
1970 | scic_sds_phy_start( | ||
1971 | iport->sci.phy_table[idx]); | ||
1972 | } | ||
1973 | } | ||
1974 | spin_unlock_irqrestore(&ihost->scic_lock, flags); | ||
1975 | } | ||
1964 | return ret; | 1976 | return ret; |
1965 | } | 1977 | } |
1966 | 1978 | ||