scsi: libsas: Export sas_phy_enable()
authorLuo Jiaxing <luojiaxing@huawei.com>
Tue, 12 Oct 2021 12:26:27 +0000 (20:26 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Oct 2021 02:46:06 +0000 (22:46 -0400)
Export sas_phy_enable() so LLDDs can directly use it to control remote
phys.

We already do this for companion function sas_phy_reset().

Link: https://lore.kernel.org/r/1634041588-74824-4-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_init.c
include/scsi/libsas.h

index 37cc92837fdfd6a43bc881900d881d745fd76845..b640e09af6a4a4ab76e5456004cdf30633269fe5 100644 (file)
@@ -254,7 +254,7 @@ static int transport_sas_phy_reset(struct sas_phy *phy, int hard_reset)
        }
 }
 
-static int sas_phy_enable(struct sas_phy *phy, int enable)
+int sas_phy_enable(struct sas_phy *phy, int enable)
 {
        int ret;
        enum phy_func cmd;
@@ -286,6 +286,7 @@ static int sas_phy_enable(struct sas_phy *phy, int enable)
        }
        return ret;
 }
+EXPORT_SYMBOL_GPL(sas_phy_enable);
 
 int sas_phy_reset(struct sas_phy *phy, int hard_reset)
 {
index 6fe125a71b6088390fbca461b53131ea7d25499f..79e4903bd414ff13fe65fde9572467edf559ff67 100644 (file)
@@ -664,6 +664,7 @@ extern void sas_suspend_ha(struct sas_ha_struct *sas_ha);
 
 int sas_set_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates);
 int sas_phy_reset(struct sas_phy *phy, int hard_reset);
+int sas_phy_enable(struct sas_phy *phy, int enable);
 extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
 extern int sas_target_alloc(struct scsi_target *);
 extern int sas_slave_configure(struct scsi_device *);