* [PATCH] r8169: use pci_dev->subsystem_{vendor|device}
@ 2011-07-22 15:37 Sergei Shtylyov
2011-07-23 0:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-07-22 15:37 UTC (permalink / raw)
To: netdev, nic_swsd, romieu
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>
---
The patch is against the recent Linus' tree.
drivers/net/r8169.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: linux-2.6/drivers/net/r8169.c
===================================================================
--- linux-2.6.orig/drivers/net/r8169.c
+++ linux-2.6/drivers/net/r8169.c
@@ -1982,12 +1982,9 @@ static void rtl8169sb_hw_phy_config(stru
static void rtl8169scd_hw_phy_config_quirk(struct rtl8169_private *tp)
{
struct pci_dev *pdev = tp->pci_dev;
- u16 vendor_id, device_id;
- pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &vendor_id);
- pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &device_id);
-
- if ((vendor_id != PCI_VENDOR_ID_GIGABYTE) || (device_id != 0xe000))
+ if ((pdev->subsystem_vendor != PCI_VENDOR_ID_GIGABYTE) ||
+ (pdev->subsystem_device != 0xe000))
return;
rtl_writephy(tp, 0x1f, 0x0001);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] r8169: use pci_dev->subsystem_{vendor|device}
2011-07-22 15:37 [PATCH] r8169: use pci_dev->subsystem_{vendor|device} Sergei Shtylyov
@ 2011-07-23 0:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-23 0:15 UTC (permalink / raw)
To: sshtylyov; +Cc: netdev, nic_swsd, romieu
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Fri, 22 Jul 2011 19:37:24 +0400
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-23 0:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 15:37 [PATCH] r8169: use pci_dev->subsystem_{vendor|device} Sergei Shtylyov
2011-07-23 0:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).