netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3 resend] ssb: PCI revision ID register is 8-bit wide
@ 2011-07-01 18:35 Sergei Shtylyov
  2011-07-05 19:33 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2011-07-01 18:35 UTC (permalink / raw)
  To: mb, netdev

The SSB code reads PCI revision ID register as 16-bit entity while the register
is actually 8-bit only (the next 8 bits are the programming interface register).
Fix the read and make the 'rev' field of 'struct ssb_boardinfo' 8-bit as well,
to match the register size.

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

---
The patch is against the recent Linus' tree.
Resending with proper tearline this time...

 drivers/ssb/pci.c       |    2 +-
 include/linux/ssb/ssb.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/ssb/pci.c
===================================================================
--- linux-2.6.orig/drivers/ssb/pci.c
+++ linux-2.6/drivers/ssb/pci.c
@@ -738,7 +738,7 @@ static void ssb_pci_get_boardinfo(struct
 			     &bi->vendor);
 	pci_read_config_word(bus->host_pci, PCI_SUBSYSTEM_ID,
 			     &bi->type);
-	pci_read_config_word(bus->host_pci, PCI_REVISION_ID,
+	pci_read_config_byte(bus->host_pci, PCI_REVISION_ID,
 			     &bi->rev);
 }
 
Index: linux-2.6/include/linux/ssb/ssb.h
===================================================================
--- linux-2.6.orig/include/linux/ssb/ssb.h
+++ linux-2.6/include/linux/ssb/ssb.h
@@ -99,7 +99,7 @@ struct ssb_sprom {
 struct ssb_boardinfo {
 	u16 vendor;
 	u16 type;
-	u16 rev;
+	u8  rev;
 };
 
 

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

* Re: [PATCH 1/3 resend] ssb: PCI revision ID register is 8-bit wide
  2011-07-01 18:35 [PATCH 1/3 resend] ssb: PCI revision ID register is 8-bit wide Sergei Shtylyov
@ 2011-07-05 19:33 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2011-07-05 19:33 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: mb, netdev

On Fri, Jul 01, 2011 at 10:35:28PM +0400, Sergei Shtylyov wrote:
> The SSB code reads PCI revision ID register as 16-bit entity while the register
> is actually 8-bit only (the next 8 bits are the programming interface register).
> Fix the read and make the 'rev' field of 'struct ssb_boardinfo' 8-bit as well,
> to match the register size.
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

Applied.

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

end of thread, other threads:[~2011-07-05 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 18:35 [PATCH 1/3 resend] ssb: PCI revision ID register is 8-bit wide Sergei Shtylyov
2011-07-05 19:33 ` John W. Linville

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