Commit 48d6f0a6 authored by Sreekanth Reddy's avatar Sreekanth Reddy Committed by Martin K. Petersen

scsi: mpt3sas: Use configured PCIe link speed, not max

When enabling high iops queues, the driver should use the HBA's configured
PCIe link speed instead of looking for the maximum link speed.

I.e. enable high iops queues only if Aero/Sea HBA's configured PCIe link
speed is set to 16GT/s.
Signed-off-by: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 381abbd1
...@@ -2979,7 +2979,7 @@ static void ...@@ -2979,7 +2979,7 @@ static void
_base_check_and_enable_high_iops_queues(struct MPT3SAS_ADAPTER *ioc, _base_check_and_enable_high_iops_queues(struct MPT3SAS_ADAPTER *ioc,
int hba_msix_vector_count) int hba_msix_vector_count)
{ {
enum pci_bus_speed speed = PCI_SPEED_UNKNOWN; u16 lnksta, speed;
if (perf_mode == MPT_PERF_MODE_IOPS || if (perf_mode == MPT_PERF_MODE_IOPS ||
perf_mode == MPT_PERF_MODE_LATENCY) { perf_mode == MPT_PERF_MODE_LATENCY) {
...@@ -2989,15 +2989,10 @@ _base_check_and_enable_high_iops_queues(struct MPT3SAS_ADAPTER *ioc, ...@@ -2989,15 +2989,10 @@ _base_check_and_enable_high_iops_queues(struct MPT3SAS_ADAPTER *ioc,
if (perf_mode == MPT_PERF_MODE_DEFAULT) { if (perf_mode == MPT_PERF_MODE_DEFAULT) {
speed = pcie_get_speed_cap(ioc->pdev); pcie_capability_read_word(ioc->pdev, PCI_EXP_LNKSTA, &lnksta);
dev_info(&ioc->pdev->dev, "PCIe device speed is %s\n", speed = lnksta & PCI_EXP_LNKSTA_CLS;
speed == PCIE_SPEED_2_5GT ? "2.5GHz" :
speed == PCIE_SPEED_5_0GT ? "5.0GHz" :
speed == PCIE_SPEED_8_0GT ? "8.0GHz" :
speed == PCIE_SPEED_16_0GT ? "16.0GHz" :
"Unknown");
if (speed < PCIE_SPEED_16_0GT) { if (speed < 0x4) {
ioc->high_iops_queues = 0; ioc->high_iops_queues = 0;
return; return;
} }
......
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