aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-27 18:35:43 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-09-27 18:35:43 -0400
commit605d240052473228bf0c8c051cad825fddb25502 (patch)
treec1eeed2abdf258cb6cf2d14f5986c2e9bed40a1e /drivers/scsi
parentd3c02799d32039ddd548c20680f7982b646ba3d8 (diff)
parent09a2c73ddfc7f173237fc7209a65b34dd5bcb5ed (diff)
Merge branch 'pci/misc' into next
* pci/misc: PCI: Remove unused PCI_MSIX_FLAGS_BIRMASK definition PCI: acpiphp_ibm: Convert to dynamic debug PCI: acpiphp: Convert to dynamic debug PCI: Remove Intel Haswell D3 delays PCI: Pass type, width, and prefetchability for window alignment PCI: Document reason for using pci_is_root_bus() PCI: Use pci_is_root_bus() to check for root bus PCI: Remove unused "is_pcie" from pci_dev structure PCI: Update pci_find_slot() description in pci.txt [SCSI] qla2xxx: Use standard PCIe Capability Link register field names PCI: Fix comment typo, remove unnecessary !! in pci_is_pcie() PCI: Drop "setting latency timer" messages
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 9f01bbbf3a26..bcd57f699ebb 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -494,18 +494,14 @@ qla24xx_pci_info_str(struct scsi_qla_host *vha, char *str)
494 static char *pci_bus_modes[] = { "33", "66", "100", "133", }; 494 static char *pci_bus_modes[] = { "33", "66", "100", "133", };
495 struct qla_hw_data *ha = vha->hw; 495 struct qla_hw_data *ha = vha->hw;
496 uint32_t pci_bus; 496 uint32_t pci_bus;
497 int pcie_reg;
498 497
499 pcie_reg = pci_pcie_cap(ha->pdev); 498 if (pci_is_pcie(ha->pdev)) {
500 if (pcie_reg) {
501 char lwstr[6]; 499 char lwstr[6];
502 uint16_t pcie_lstat, lspeed, lwidth; 500 uint32_t lstat, lspeed, lwidth;
503 501
504 pcie_reg += PCI_EXP_LNKCAP; 502 pcie_capability_read_dword(ha->pdev, PCI_EXP_LNKCAP, &lstat);
505 pci_read_config_word(ha->pdev, pcie_reg, &pcie_lstat); 503 lspeed = lstat & PCI_EXP_LNKCAP_SLS;
506 lspeed = pcie_lstat & (BIT_0 | BIT_1 | BIT_2 | BIT_3); 504 lwidth = (lstat & PCI_EXP_LNKCAP_MLW) >> 4;
507 lwidth = (pcie_lstat &
508 (BIT_4 | BIT_5 | BIT_6 | BIT_7 | BIT_8 | BIT_9)) >> 4;
509 505
510 strcpy(str, "PCIe ("); 506 strcpy(str, "PCIe (");
511 switch (lspeed) { 507 switch (lspeed) {