netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ssb: use pci_dev->revision
@ 2011-06-23 14:49 Sergei Shtylyov
  2011-06-23 15:09 ` Michael Büsch
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-06-23 14:49 UTC (permalink / raw)
  To: mb, netdev

The bus scan code reads PCI revision ID from the PCI configuration register
while it's already stored by PCI subsystem in the 'revision' field of 'struct
pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
The patch is against the recent Linus' tree.

There's another place where the revision ID register is read but as 16-bit
entity (probably by mistake though), so I didn't convert it...

 drivers/ssb/scan.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: linux-2.6/drivers/ssb/scan.c
===================================================================
--- linux-2.6.orig/drivers/ssb/scan.c
+++ linux-2.6/drivers/ssb/scan.c
@@ -310,8 +310,7 @@ int ssb_bus_scan(struct ssb_bus *bus,
 	} else {
 		if (bus->bustype == SSB_BUSTYPE_PCI) {
 			bus->chip_id = pcidev_to_chipid(bus->host_pci);
-			pci_read_config_byte(bus->host_pci, PCI_REVISION_ID,
-					     &bus->chip_rev);
+			bus->chip_rev = bus->host_pci->revision;
 			bus->chip_package = 0;
 		} else {
 			bus->chip_id = 0x4710;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-24 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 14:49 [PATCH] ssb: use pci_dev->revision Sergei Shtylyov
2011-06-23 15:09 ` Michael Büsch
2011-06-23 15:11   ` Sergei Shtylyov
2011-06-23 15:32     ` Michael Büsch
2011-06-24 11:20       ` Sergei Shtylyov

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).