Commit eed9f513 authored by John Garry's avatar John Garry Committed by Martin K. Petersen
Browse files

scsi: hisi_sas: Call hisi_sas_slave_configure() from slave_configure_v3_hw()

There is duplicated code between slave_configure_v3_hw() and
hisi_sas_slave_configure(), so call common function
hisi_sas_slave_configure() from slave_configure_v3_hw().

Link: https://lore.kernel.org/r/1657823002-139010-2-git-send-email-john.garry@huawei.com


Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 502f4c18
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -2778,16 +2778,13 @@ static DEVICE_ATTR_RW(intr_coal_count_v3_hw);
static int slave_configure_v3_hw(struct scsi_device *sdev)
{
	struct Scsi_Host *shost = dev_to_shost(&sdev->sdev_gendev);
	struct domain_device *ddev = sdev_to_domain_dev(sdev);
	struct hisi_hba *hisi_hba = shost_priv(shost);
	int ret = hisi_sas_slave_configure(sdev);
	struct device *dev = hisi_hba->dev;
	int ret = sas_slave_configure(sdev);
	unsigned int max_sectors;

	if (ret)
		return ret;
	if (!dev_is_sata(ddev))
		sas_change_queue_depth(sdev, 64);

	if (sdev->type == TYPE_ENCLOSURE)
		return 0;