ssb: use pci_dev->revision
Subsystems (3)
PATCH 1/1 ssb: use pci_dev->revision
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'...
---
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(-)
drivers/ssb/scan.c +1 -2
@@ -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 ;
Michael Büsch
maintainerQuoted 11 lines · On Thu, 23 Jun 2011 18:49:52 +0400 Sergei Shtylyov <[email protected]>…
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 <[email protected]>---
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...
Where is that?
Quoted 18 lines
drivers/ssb/scan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)Index:
linux-2.6/drivers/ssb/scan.c
===================================================================drivers/ssb/scan.c +1
-2@@ -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 ;
Hello.
Quoted 6 lines · Michael Büsch
Quoted 5 lines
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 <[email protected]>
Quoted 7 lines
Quoted 5 lines
---
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...
Where is that?
drivers/ssb/pci.c, line 741.
WBR, Sergei
Michael Büsch
maintainerQuoted 13 lines · On Thu, 23 Jun 2011 19:11:59 +0400 Sergei Shtylyov <[email protected]> wrote:
Hello.
Quoted 8 lines · Michael Büsch
Quoted 8 lines
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 <[email protected]>---
The patch is against the recent Linus' tree.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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...
Where is that?
drivers/ssb/pci.c, line 741.
Yes that probably is by mistake. Can you convert it as well, please?
Hello.
Quoted 9 lines · Michael Büsch
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
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<[email protected]>---
The patch is against the recent Linus' tree.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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...
Where is that?
drivers/ssb/pci.c, line 741.Yes that probably is by mistake. Can you convert it as well, please?
Tnen that whole function needs to be converted, as it reads subsystrem ID
from the PCI config. space, while it's aready stored by PCI core. That is a matter of yet another patch.
WBR, Sergei