Acked-by: Saurav Kashyap <[email protected]>

Thanks,
~Saurav



>Use the standard #defines for PCIe Link Capability register fields
>rather than bare numbers.  This also uses the new PCI Express Capability
>accessor rather than reading the capability directly.
>
>Signed-off-by: Bjorn Helgaas <[email protected]>
>CC: Andrew Vasquez <[email protected]>
>CC: [email protected]
>CC: "James E.J. Bottomley" <[email protected]>
>CC: [email protected]
>---
> drivers/scsi/qla2xxx/qla_os.c |   14 +++++---------
> 1 files changed, 5 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
>index d501bf5..b5d070f 100644
>--- a/drivers/scsi/qla2xxx/qla_os.c
>+++ b/drivers/scsi/qla2xxx/qla_os.c
>@@ -480,18 +480,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 (");
>               if (lspeed == 1)
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to [email protected]
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


________________________________

This message and any attached documents contain information from QLogic 
Corporation or its wholly-owned subsidiaries that may be confidential. If you 
are not the intended recipient, you may not read, copy, distribute, or use this 
information. If you have received this transmission in error, please notify the 
sender immediately by reply e-mail and then delete this message.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to