aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/isci/init.c3
-rw-r--r--drivers/scsi/isci/port.c25
-rw-r--r--drivers/scsi/isci/port.h1
3 files changed, 29 insertions, 0 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index c20fda090423..68d9bc23d190 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -193,6 +193,9 @@ static struct sas_domain_function_template isci_transport_ops = {
193 .lldd_lu_reset = isci_task_lu_reset, 193 .lldd_lu_reset = isci_task_lu_reset,
194 .lldd_query_task = isci_task_query_task, 194 .lldd_query_task = isci_task_query_task,
195 195
196 /* ata recovery called from ata-eh */
197 .lldd_ata_check_ready = isci_ata_check_ready,
198
196 /* Port and Adapter management */ 199 /* Port and Adapter management */
197 .lldd_clear_nexus_port = isci_task_clear_nexus_port, 200 .lldd_clear_nexus_port = isci_task_clear_nexus_port,
198 .lldd_clear_nexus_ha = isci_task_clear_nexus_ha, 201 .lldd_clear_nexus_ha = isci_task_clear_nexus_ha,
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index e55ef65f5212..c5ae94dbef48 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -1675,6 +1675,31 @@ int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *ipor
1675 return ret; 1675 return ret;
1676} 1676}
1677 1677
1678int isci_ata_check_ready(struct domain_device *dev)
1679{
1680 struct isci_port *iport = dev->port->lldd_port;
1681 struct isci_host *ihost = dev_to_ihost(dev);
1682 struct isci_remote_device *idev;
1683 unsigned long flags;
1684 int rc = 0;
1685
1686 spin_lock_irqsave(&ihost->scic_lock, flags);
1687 idev = isci_lookup_device(dev);
1688 spin_unlock_irqrestore(&ihost->scic_lock, flags);
1689
1690 if (!idev)
1691 goto out;
1692
1693 if (test_bit(IPORT_RESET_PENDING, &iport->state))
1694 goto out;
1695
1696 rc = !!iport->active_phy_mask;
1697 out:
1698 isci_put_device(idev);
1699
1700 return rc;
1701}
1702
1678void isci_port_deformed(struct asd_sas_phy *phy) 1703void isci_port_deformed(struct asd_sas_phy *phy)
1679{ 1704{
1680 struct isci_host *ihost = phy->ha->lldd_ha; 1705 struct isci_host *ihost = phy->ha->lldd_ha;
diff --git a/drivers/scsi/isci/port.h b/drivers/scsi/isci/port.h
index a0dcdaeac3b2..321b987d582f 100644
--- a/drivers/scsi/isci/port.h
+++ b/drivers/scsi/isci/port.h
@@ -303,4 +303,5 @@ void isci_port_init(
303 303
304int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *iport, 304int isci_port_perform_hard_reset(struct isci_host *ihost, struct isci_port *iport,
305 struct isci_phy *iphy); 305 struct isci_phy *iphy);
306int isci_ata_check_ready(struct domain_device *dev);
306#endif /* !defined(_ISCI_PORT_H_) */ 307#endif /* !defined(_ISCI_PORT_H_) */