diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-07-24 05:20:19 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 12:11:13 -0400 |
commit | d892aa00bc89c977acc71dc10aa79c2984710c12 (patch) | |
tree | 529ebceed455b58928f9eb2dba3fa281e34003fb /drivers/net/ethernet/neterion | |
parent | 23d028cc86f6136e357980323dfe958eade547b4 (diff) |
vxge: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify vxge driver.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/net/ethernet/neterion')
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c index 32d06824fe3e..c2e420a84d22 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-config.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c | |||
@@ -757,7 +757,7 @@ __vxge_hw_verify_pci_e_info(struct __vxge_hw_device *hldev) | |||
757 | u16 lnk; | 757 | u16 lnk; |
758 | 758 | ||
759 | /* Get the negotiated link width and speed from PCI config space */ | 759 | /* Get the negotiated link width and speed from PCI config space */ |
760 | pci_read_config_word(dev, dev->pcie_cap + PCI_EXP_LNKSTA, &lnk); | 760 | pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnk); |
761 | 761 | ||
762 | if ((lnk & PCI_EXP_LNKSTA_CLS) != 1) | 762 | if ((lnk & PCI_EXP_LNKSTA_CLS) != 1) |
763 | return VXGE_HW_ERR_INVALID_PCI_INFO; | 763 | return VXGE_HW_ERR_INVALID_PCI_INFO; |
@@ -1982,7 +1982,7 @@ u16 vxge_hw_device_link_width_get(struct __vxge_hw_device *hldev) | |||
1982 | struct pci_dev *dev = hldev->pdev; | 1982 | struct pci_dev *dev = hldev->pdev; |
1983 | u16 lnk; | 1983 | u16 lnk; |
1984 | 1984 | ||
1985 | pci_read_config_word(dev, dev->pcie_cap + PCI_EXP_LNKSTA, &lnk); | 1985 | pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnk); |
1986 | return (lnk & VXGE_HW_PCI_EXP_LNKCAP_LNK_WIDTH) >> 4; | 1986 | return (lnk & VXGE_HW_PCI_EXP_LNKCAP_LNK_WIDTH) >> 4; |
1987 | } | 1987 | } |
1988 | 1988 | ||