summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-09-27 16:35:43 -0600
committerBjorn Helgaas <bhelgaas@google.com>2013-09-27 16:35:43 -0600
commit605d240052473228bf0c8c051cad825fddb25502 (patch)
treec1eeed2abdf258cb6cf2d14f5986c2e9bed40a1e /drivers/scsi/qla2xxx
parentd3c02799d32039ddd548c20680f7982b646ba3d8 (diff)
parent09a2c73ddfc7f173237fc7209a65b34dd5bcb5ed (diff)
downloadlinux-stable-605d240052473228bf0c8c051cad825fddb25502.tar.gz
linux-stable-605d240052473228bf0c8c051cad825fddb25502.tar.bz2
linux-stable-605d240052473228bf0c8c051cad825fddb25502.zip
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/qla2xxx')
-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)
static char *pci_bus_modes[] = { "33", "66", "100", "133", };
struct qla_hw_data *ha = vha->hw;
uint32_t pci_bus;
- int pcie_reg;
- pcie_reg = pci_pcie_cap(ha->pdev);
- if (pcie_reg) {
+ if (pci_is_pcie(ha->pdev)) {
char lwstr[6];
- uint16_t pcie_lstat, lspeed, lwidth;
+ uint32_t lstat, lspeed, lwidth;
- pcie_reg += PCI_EXP_LNKCAP;
- pci_read_config_word(ha->pdev, pcie_reg, &pcie_lstat);
- lspeed = pcie_lstat & (BIT_0 | BIT_1 | BIT_2 | BIT_3);
- lwidth = (pcie_lstat &
- (BIT_4 | BIT_5 | BIT_6 | BIT_7 | BIT_8 | BIT_9)) >> 4;
+ pcie_capability_read_dword(ha->pdev, PCI_EXP_LNKCAP, &lstat);
+ lspeed = lstat & PCI_EXP_LNKCAP_SLS;
+ lwidth = (lstat & PCI_EXP_LNKCAP_MLW) >> 4;
strcpy(str, "PCIe (");
switch (lspeed) {