Commit 59b433c8 authored by Raghava Aditya Renukunta's avatar Raghava Aditya Renukunta Committed by Martin K. Petersen

scsi: aacraid: Fix PD performance regression over incorrect qd being set

The driver fails to set the correct queue depth for native devices, due to
failing to set the device type prior to calling aac_set_safw_target_qd().
This results in slave configure setting the queue depth to 1.

This causes around 30% performance degradation. Fixed by setting the dev
type before trying to set queue depth.
Reported-by: default avatarSteve Best <sbest@redhat.com>
Fixes: 0bcb45fb ("scsi: aacraid: Add helper function to set queue depth")
cc: stable@vger.kernel.org
Signed-off-by: default avatarRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: default avatarDavid Carroll <David.Carroll@microsemi.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 63ce3c38
...@@ -1974,7 +1974,6 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev) ...@@ -1974,7 +1974,6 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev)
u32 lun_count, nexus; u32 lun_count, nexus;
u32 i, bus, target; u32 i, bus, target;
u8 expose_flag, attribs; u8 expose_flag, attribs;
u8 devtype;
lun_count = aac_get_safw_phys_lun_count(dev); lun_count = aac_get_safw_phys_lun_count(dev);
...@@ -1992,23 +1991,23 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev) ...@@ -1992,23 +1991,23 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev)
continue; continue;
if (expose_flag != 0) { if (expose_flag != 0) {
devtype = AAC_DEVTYPE_RAID_MEMBER; dev->hba_map[bus][target].devtype =
goto update_devtype; AAC_DEVTYPE_RAID_MEMBER;
continue;
} }
if (nexus != 0 && (attribs & 8)) { if (nexus != 0 && (attribs & 8)) {
devtype = AAC_DEVTYPE_NATIVE_RAW; dev->hba_map[bus][target].devtype =
AAC_DEVTYPE_NATIVE_RAW;
dev->hba_map[bus][target].rmw_nexus = dev->hba_map[bus][target].rmw_nexus =
nexus; nexus;
} else } else
devtype = AAC_DEVTYPE_ARC_RAW; dev->hba_map[bus][target].devtype =
AAC_DEVTYPE_ARC_RAW;
dev->hba_map[bus][target].scan_counter = dev->scan_counter; dev->hba_map[bus][target].scan_counter = dev->scan_counter;
aac_set_safw_target_qd(dev, bus, target); aac_set_safw_target_qd(dev, bus, target);
update_devtype:
dev->hba_map[bus][target].devtype = devtype;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment