Commit 798b261b authored by nifujia's avatar nifujia Committed by Zheng Zengkai
Browse files

Export-sas_phy_enable

mainline inclusion
from mainline-v5.16-rc1
commit 00aeaf32
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QKP3
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/scsi/libsas/sas_init.c?id=00aeaf329a3a1ea3d3606fefa1d29f69f828bd21

-----------------------------------------------------------------------------------

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: default avatarLuo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: default avatarOuyangdelong <ouyangdelong@huawei.com>
Signed-off-by: default avatarNifujia <nifujia1@hisilicon.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent bfd6008b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -252,7 +252,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;
@@ -284,6 +284,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)
{
+1 −0
Original line number Diff line number Diff line
@@ -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 *);