* [PATCH] 2.5.45-ac1 CardBus compile Fix
@ 2002-11-07 15:41 Osamu Tomita
2002-11-07 15:54 ` Russell King
0 siblings, 1 reply; 3+ messages in thread
From: Osamu Tomita @ 2002-11-07 15:41 UTC (permalink / raw)
To: LKML; +Cc: Alan Cox
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
I couldn't compile cistpl.c, that call obsolete function.
Here is trivial patch. This works fine for me.
Regards,
Osamu Tomita
[-- Attachment #2: 2.5.45-ac1-cardbus-compile.patch --]
[-- Type: text/plain, Size: 461 bytes --]
--- linux-2.5.45-ac1/drivers/pcmcia/cistpl.c.orig Thu Oct 31 09:42:24 2002
+++ linux-2.5.45-ac1/drivers/pcmcia/cistpl.c Thu Nov 7 01:03:55 2002
@@ -429,7 +429,7 @@
#ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS) {
u_int ptr;
- pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr);
+ pci_bus_read_config_dword(s->cap.cb_dev->bus, 0, 0x28, &ptr);
tuple->CISOffset = ptr & ~7;
SPACE(tuple->Flags) = (ptr & 7);
} else
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] 2.5.45-ac1 CardBus compile Fix 2002-11-07 15:41 [PATCH] 2.5.45-ac1 CardBus compile Fix Osamu Tomita @ 2002-11-07 15:54 ` Russell King 2002-11-07 16:28 ` Osamu Tomita 0 siblings, 1 reply; 3+ messages in thread From: Russell King @ 2002-11-07 15:54 UTC (permalink / raw) To: Osamu Tomita; +Cc: LKML, Alan Cox On Fri, Nov 08, 2002 at 12:41:20AM +0900, Osamu Tomita wrote: > I couldn't compile cistpl.c, that call obsolete function. > > Here is trivial patch. This works fine for me. > > Regards, > Osamu Tomita > --- linux-2.5.45-ac1/drivers/pcmcia/cistpl.c.orig Thu Oct 31 09:42:24 2002 > +++ linux-2.5.45-ac1/drivers/pcmcia/cistpl.c Thu Nov 7 01:03:55 2002 > @@ -429,7 +429,7 @@ > #ifdef CONFIG_CARDBUS > if (s->state & SOCKET_CARDBUS) { > u_int ptr; > - pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); > + pci_bus_read_config_dword(s->cap.cb_dev->bus, 0, 0x28, &ptr); > tuple->CISOffset = ptr & ~7; > SPACE(tuple->Flags) = (ptr & 7); > } else I think dev->bus the bus number for the bus that the Cardbus controller is connected to? If so, this change is wrong. bus:device.function = 0:0.0 +--------+ | host | | bridge >--------+------------------ dev->bus +--------+ | | +----v----+ dev | Cardbus | | Bridge | +---------+ | | bus number = dev->subordinate->number | | +----v----+ bus = dev->subordinate->number | Cardbus | device = 0 | card | +---------+ The device we want to read the CIS offset from is the cardbus card. In the above case, your change means we'll try to read the CIS offset from the host bridge, which is obviously wrong. -- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] 2.5.45-ac1 CardBus compile Fix 2002-11-07 15:54 ` Russell King @ 2002-11-07 16:28 ` Osamu Tomita 0 siblings, 0 replies; 3+ messages in thread From: Osamu Tomita @ 2002-11-07 16:28 UTC (permalink / raw) To: Russell King; +Cc: LKML, Alan Cox Russell King wrote: > > On Fri, Nov 08, 2002 at 12:41:20AM +0900, Osamu Tomita wrote: > > I couldn't compile cistpl.c, that call obsolete function. > > > > Here is trivial patch. This works fine for me. > > > > Regards, > > Osamu Tomita > > --- linux-2.5.45-ac1/drivers/pcmcia/cistpl.c.orig Thu Oct 31 09:42:24 2002 > > +++ linux-2.5.45-ac1/drivers/pcmcia/cistpl.c Thu Nov 7 01:03:55 2002 > > @@ -429,7 +429,7 @@ > > #ifdef CONFIG_CARDBUS > > if (s->state & SOCKET_CARDBUS) { > > u_int ptr; > > - pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); > > + pci_bus_read_config_dword(s->cap.cb_dev->bus, 0, 0x28, &ptr); > > tuple->CISOffset = ptr & ~7; > > SPACE(tuple->Flags) = (ptr & 7); > > } else > > I think dev->bus the bus number for the bus that the Cardbus controller > is connected to? If so, this change is wrong. > > bus:device.function = 0:0.0 > +--------+ > | host | > | bridge >--------+------------------ dev->bus > +--------+ | > | > +----v----+ dev > | Cardbus | > | Bridge | > +---------+ > | > | bus number = dev->subordinate->number > | > | > +----v----+ bus = dev->subordinate->number > | Cardbus | device = 0 > | card | > +---------+ > > The device we want to read the CIS offset from is the cardbus card. > In the above case, your change means we'll try to read the CIS offset > from the host bridge, which is obviously wrong. Thanks for exposition. Is this right? --- linux-2.5.45-ac1/drivers/pcmcia/cistpl.c.orig Thu Oct 31 09:42:24 2002 +++ linux-2.5.45-ac1/drivers/pcmcia/cistpl.c Fri Nov 8 01:19:32 2002 @@ -429,7 +429,7 @@ #ifdef CONFIG_CARDBUS if (s->state & SOCKET_CARDBUS) { u_int ptr; - pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); + pci_bus_read_config_dword(s->cap.cb_dev->subordinate, 0, 0x28, &ptr); tuple->CISOffset = ptr & ~7; SPACE(tuple->Flags) = (ptr & 7); } else ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-07 16:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-11-07 15:41 [PATCH] 2.5.45-ac1 CardBus compile Fix Osamu Tomita 2002-11-07 15:54 ` Russell King 2002-11-07 16:28 ` Osamu Tomita
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.