* [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* Re: [PATCH] ssb: use pci_dev->revision
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
0 siblings, 1 reply; 5+ messages in thread
From: Michael Büsch @ 2011-06-23 15:09 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev
On Thu, 23 Jun 2011 18:49:52 +0400
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> 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...
Where is that?
> 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* Re: [PATCH] ssb: use pci_dev->revision
2011-06-23 15:09 ` Michael Büsch
@ 2011-06-23 15:11 ` Sergei Shtylyov
2011-06-23 15:32 ` Michael Büsch
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-06-23 15:11 UTC (permalink / raw)
To: Michael Büsch; +Cc: Sergei Shtylyov, netdev
Hello.
Michael Büsch wrote:
>> 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...
> Where is that?
drivers/ssb/pci.c, line 741.
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ssb: use pci_dev->revision
2011-06-23 15:11 ` Sergei Shtylyov
@ 2011-06-23 15:32 ` Michael Büsch
2011-06-24 11:20 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Michael Büsch @ 2011-06-23 15:32 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Sergei Shtylyov, netdev
On Thu, 23 Jun 2011 19:11:59 +0400
Sergei Shtylyov <sshtylyov@mvista.com> wrote:
> Hello.
>
> Michael Büsch wrote:
>
> >> 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...
>
> > Where is that?
>
> drivers/ssb/pci.c, line 741.
Yes that probably is by mistake. Can you convert it as well, please?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ssb: use pci_dev->revision
2011-06-23 15:32 ` Michael Büsch
@ 2011-06-24 11:20 ` Sergei Shtylyov
0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2011-06-24 11:20 UTC (permalink / raw)
To: Michael Büsch; +Cc: Sergei Shtylyov, netdev
Hello.
On 23-06-2011 19:32, Michael Büsch wrote:
>>>> 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...
>>> 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
^ 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).