Skip to contentSkip to conversation

ssb: PCI revision ID register is 8-bit wide

PATCH Applied Sergei Shtylyov 1 participant 1 message Jul 1, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ssb: PCI revision ID register is 8-bit wide

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.

 drivers/ssb/pci.c       |    2 +-
 include/linux/ssb/ssb.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/ssb/pci.c +1 -1
Index: 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);
 }
 
include/linux/ssb/ssb.h +1 -1
Index: 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;
 };