aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-07-22 01:37:24 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-22 20:01:12 -0400
commitccbae55e1c6dc18e95d72c044cf9345ea08abf7b (patch)
tree85d274e33093671d5c76ef48dd1418a64f6fbd7c /drivers/net/r8169.c
parent431bf99d26157d56689e5de65bd27ce9f077fc3f (diff)
r8169: use pci_dev->subsystem_{vendor|device}
The driver reads PCI subsystem IDs from the PCI configuration registers while they are already stored by the PCI subsystem in the 'subsystem_{vendor|device}' fields of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 40bcb82d9116..4e2d1448093c 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2160,12 +2160,9 @@ static void rtl8169sb_hw_phy_config(struct rtl8169_private *tp)
2160static void rtl8169scd_hw_phy_config_quirk(struct rtl8169_private *tp) 2160static void rtl8169scd_hw_phy_config_quirk(struct rtl8169_private *tp)
2161{ 2161{
2162 struct pci_dev *pdev = tp->pci_dev; 2162 struct pci_dev *pdev = tp->pci_dev;
2163 u16 vendor_id, device_id;
2164 2163
2165 pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &vendor_id); 2164 if ((pdev->subsystem_vendor != PCI_VENDOR_ID_GIGABYTE) ||
2166 pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &device_id); 2165 (pdev->subsystem_device != 0xe000))
2167
2168 if ((vendor_id != PCI_VENDOR_ID_GIGABYTE) || (device_id != 0xe000))
2169 return; 2166 return;
2170 2167
2171 rtl_writephy(tp, 0x1f, 0x0001); 2168 rtl_writephy(tp, 0x1f, 0x0001);