]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] libsas: export sas_find_local_phy function
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 24 Feb 2008 05:35:44 +0000 (23:35 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 24 Feb 2008 05:52:30 +0000 (23:52 -0600)
This is needed by the to be added I_T reset function in aic94xx.  It
needs to know the local phy so it can send a link or hard reset along
the path.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libsas/sas_scsi_host.c
include/scsi/libsas.h

index 704ea06a6e500a8d3bfd25179dc9efa73791c655..f3706f4b79ce16083197f277010d8573479098b7 100644 (file)
@@ -434,7 +434,7 @@ static int sas_recover_I_T(struct domain_device *dev)
 }
 
 /* Find the sas_phy that's attached to this device */
-static struct sas_phy *find_local_sas_phy(struct domain_device *dev)
+struct sas_phy *sas_find_local_phy(struct domain_device *dev)
 {
        struct domain_device *pdev = dev->parent;
        struct ex_phy *exphy = NULL;
@@ -456,6 +456,7 @@ static struct sas_phy *find_local_sas_phy(struct domain_device *dev)
        BUG_ON(!exphy);
        return exphy->phy;
 }
+EXPORT_SYMBOL_GPL(sas_find_local_phy);
 
 /* Attempt to send a LUN reset message to a device */
 int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
@@ -482,7 +483,7 @@ int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
 int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd)
 {
        struct domain_device *dev = cmd_to_domain_dev(cmd);
-       struct sas_phy *phy = find_local_sas_phy(dev);
+       struct sas_phy *phy = sas_find_local_phy(dev);
        int res;
 
        res = sas_phy_reset(phy, 1);
index 3ffd6b582a97144cb37009ef6ef47d1ff4cd8feb..39e1cac24bb751503fdef353a764292326b32037 100644 (file)
@@ -675,5 +675,6 @@ extern int sas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
 
 extern void sas_ssp_task_response(struct device *dev, struct sas_task *task,
                                  struct ssp_response_iu *iu);
+struct sas_phy *sas_find_local_phy(struct domain_device *dev);
 
 #endif /* _SASLIB_H_ */