diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-07-01 16:03:44 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:52 -0400 |
commit | bc6f387d3156702a0430585b93c04934254c0de1 (patch) | |
tree | 53fcdcd362a520f134c31004a8c5a068b615105e /drivers/scsi | |
parent | a8a0a133b03c6863d0f77229d19befca4de905fa (diff) |
isci: Device reset should request sas_phy_reset(phy, true)
The hard_reset parameter passed to the LLDD in the direct-attached
phy control case allows the LLDD to filter link failure events
while the direct-attached device reset is executing.
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/task.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 22504c7ef2dc..2df45c57fc60 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -1563,7 +1563,7 @@ static void isci_wait_for_smp_phy_reset(struct isci_remote_device *idev, int phy | |||
1563 | } | 1563 | } |
1564 | 1564 | ||
1565 | static int isci_reset_device(struct isci_host *ihost, | 1565 | static int isci_reset_device(struct isci_host *ihost, |
1566 | struct isci_remote_device *idev, int hard_reset) | 1566 | struct isci_remote_device *idev) |
1567 | { | 1567 | { |
1568 | struct sas_phy *phy = sas_find_local_phy(idev->domain_dev); | 1568 | struct sas_phy *phy = sas_find_local_phy(idev->domain_dev); |
1569 | struct isci_port *iport = idev->isci_port; | 1569 | struct isci_port *iport = idev->isci_port; |
@@ -1593,7 +1593,7 @@ static int isci_reset_device(struct isci_host *ihost, | |||
1593 | if (!scsi_is_sas_phy_local(phy)) | 1593 | if (!scsi_is_sas_phy_local(phy)) |
1594 | set_bit(IPORT_BCN_BLOCKED, &iport->flags); | 1594 | set_bit(IPORT_BCN_BLOCKED, &iport->flags); |
1595 | 1595 | ||
1596 | rc = sas_phy_reset(phy, hard_reset); | 1596 | rc = sas_phy_reset(phy, true); |
1597 | 1597 | ||
1598 | /* Terminate in-progress I/O now. */ | 1598 | /* Terminate in-progress I/O now. */ |
1599 | isci_remote_device_nuke_requests(ihost, idev); | 1599 | isci_remote_device_nuke_requests(ihost, idev); |
@@ -1633,8 +1633,8 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev) | |||
1633 | { | 1633 | { |
1634 | struct isci_host *ihost = dev_to_ihost(dev); | 1634 | struct isci_host *ihost = dev_to_ihost(dev); |
1635 | struct isci_remote_device *idev; | 1635 | struct isci_remote_device *idev; |
1636 | int ret, hard_reset = 1; | ||
1637 | unsigned long flags; | 1636 | unsigned long flags; |
1637 | int ret; | ||
1638 | 1638 | ||
1639 | spin_lock_irqsave(&ihost->scic_lock, flags); | 1639 | spin_lock_irqsave(&ihost->scic_lock, flags); |
1640 | idev = isci_lookup_device(dev); | 1640 | idev = isci_lookup_device(dev); |
@@ -1645,10 +1645,7 @@ int isci_task_I_T_nexus_reset(struct domain_device *dev) | |||
1645 | goto out; | 1645 | goto out; |
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) | 1648 | ret = isci_reset_device(ihost, idev); |
1649 | hard_reset = 0; | ||
1650 | |||
1651 | ret = isci_reset_device(ihost, idev, hard_reset); | ||
1652 | out: | 1649 | out: |
1653 | isci_put_device(idev); | 1650 | isci_put_device(idev); |
1654 | return ret; | 1651 | return ret; |
@@ -1659,11 +1656,8 @@ int isci_bus_reset_handler(struct scsi_cmnd *cmd) | |||
1659 | struct domain_device *dev = sdev_to_domain_dev(cmd->device); | 1656 | struct domain_device *dev = sdev_to_domain_dev(cmd->device); |
1660 | struct isci_host *ihost = dev_to_ihost(dev); | 1657 | struct isci_host *ihost = dev_to_ihost(dev); |
1661 | struct isci_remote_device *idev; | 1658 | struct isci_remote_device *idev; |
1662 | int ret, hard_reset = 1; | ||
1663 | unsigned long flags; | 1659 | unsigned long flags; |
1664 | 1660 | int ret; | |
1665 | if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) | ||
1666 | hard_reset = 0; | ||
1667 | 1661 | ||
1668 | spin_lock_irqsave(&ihost->scic_lock, flags); | 1662 | spin_lock_irqsave(&ihost->scic_lock, flags); |
1669 | idev = isci_lookup_device(dev); | 1663 | idev = isci_lookup_device(dev); |
@@ -1674,7 +1668,7 @@ int isci_bus_reset_handler(struct scsi_cmnd *cmd) | |||
1674 | goto out; | 1668 | goto out; |
1675 | } | 1669 | } |
1676 | 1670 | ||
1677 | ret = isci_reset_device(ihost, idev, hard_reset); | 1671 | ret = isci_reset_device(ihost, idev); |
1678 | out: | 1672 | out: |
1679 | isci_put_device(idev); | 1673 | isci_put_device(idev); |
1680 | return ret; | 1674 | return ret; |