2003-01-13 22:01:25

by Adam J. Richter

[permalink] [raw]
Subject: 2.5.57 missing isapnp_card_protocol

Linux-2.5.57 deletes the definition of isapnp_card_protocol
and then adds some references to it. So, the kernel does not link
if you have enabled ISA PnP support. I'm not sure whether
isapnp_card_protocol is supposed to be removed or not.

Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."


2003-01-13 22:33:40

by Jeff Garzik

[permalink] [raw]
Subject: Re: 2.5.57 missing isapnp_card_protocol

On Mon, Jan 13, 2003 at 02:09:49PM -0800, Adam J. Richter wrote:
> Linux-2.5.57 deletes the definition of isapnp_card_protocol
> and then adds some references to it. So, the kernel does not link
> if you have enabled ISA PnP support. I'm not sure whether
> isapnp_card_protocol is supposed to be removed or not.

That's the fault of some random driver that hasn't been updated to the
new isapnp API yet...

2003-01-13 23:02:12

by Ruslan U. Zakirov

[permalink] [raw]
Subject: Re: 2.5.57 missing isapnp_card_protocol

On Mon, 13 Jan 2003, Jeff Garzik wrote:

> On Mon, Jan 13, 2003 at 02:09:49PM -0800, Adam J. Richter wrote:
> > Linux-2.5.57 deletes the definition of isapnp_card_protocol
> > and then adds some references to it. So, the kernel does not link
> > if you have enabled ISA PnP support. I'm not sure whether
> > isapnp_card_protocol is supposed to be removed or not.
>
> That's the fault of some random driver that hasn't been updated to the
> new isapnp API yet...

Hello.
It's not right.
It's wrong changes in drivers/pnp/isapnp/core.c and could be fixed with
changing of two lines:
drop
protocol_for_each_card(&isapnp_card_protocol,card)
and change
protocol_for_each_card(&isapnp_card_protocol,card)
back to
protocol_for_each_card(&isapnp_protocol,card)
This changes fix compilation problems, but may be it wrong do it in this
way.

Best regards.
Ruslan.

2003-01-13 23:04:01

by Adam J. Richter

[permalink] [raw]
Subject: Re: 2.5.57 missing isapnp_card_protocol

Mon, 13 Jan 2003, Jeff Garzik wrote:
>On Mon, Jan 13, 2003 at 02:09:49PM -0800, Adam J. Richter wrote:
>> Linux-2.5.57 deletes the definition of isapnp_card_protocol
>> and then adds some references to it. So, the kernel does not link
>> if you have enabled ISA PnP support. I'm not sure whether
>> isapnp_card_protocol is supposed to be removed or not.

>That's the fault of some random driver that hasn't been updated to the
>new isapnp API yet...

A random driver like linux-2.5.57/drivers/isapnp/core.c, line
1128, which was changed _from_ referencing isapnp_protocol _to_
referencing isapnp_card_protocol? Also, if isapnp_card_protocol is
supposed to be deleted, then presumably so should its extern
declaration at line 106 of the same file.

Come to think of it, core.c is the only file that references
isapnp_card_protocol in 2.5.57. _If_ isapnp_card_protocol really
should be deleted, then here is a patch for it.

Adam J. Richter __ ______________ 575 Oroville Road
[email protected] \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."

--- linux-2.5.57/drivers/pnp/isapnp/core.c 2003-01-13 10:17:35.000000000 -0800
+++ linux/drivers/pnp/isapnp/core.c 2003-01-13 15:04:17.000000000 -0800
@@ -102,7 +102,6 @@
/* some prototypes */

static int isapnp_config_prepare(struct pnp_dev *dev);
-extern struct pnp_protocol isapnp_card_protocol;
extern struct pnp_protocol isapnp_protocol;

static inline void write_data(unsigned char x)
@@ -1125,7 +1124,7 @@
isapnp_build_device_list();
cards = 0;

- protocol_for_each_card(&isapnp_card_protocol,card) {
+ protocol_for_each_card(&isapnp_protocol,card) {
cards++;
if (isapnp_verbose) {
printk(KERN_INFO "isapnp: Card '%s'\n", card->name[0]?card->name:"Unknown");

2003-01-13 23:37:23

by Adam Belay

[permalink] [raw]
Subject: Re: 2.5.57 missing isapnp_card_protocol

On Tue, Jan 14, 2003 at 02:10:41AM +0300, Ruslan U. Zakirov wrote:
> On Mon, 13 Jan 2003, Jeff Garzik wrote:
>
> > On Mon, Jan 13, 2003 at 02:09:49PM -0800, Adam J. Richter wrote:
> > > Linux-2.5.57 deletes the definition of isapnp_card_protocol
> > > and then adds some references to it. So, the kernel does not link
> > > if you have enabled ISA PnP support. I'm not sure whether
> > > isapnp_card_protocol is supposed to be removed or not.
> >
> > That's the fault of some random driver that hasn't been updated to the
> > new isapnp API yet...
>
> Hello.
> It's not right.
> It's wrong changes in drivers/pnp/isapnp/core.c and could be fixed with
> changing of two lines:
> drop
> protocol_for_each_card(&isapnp_card_protocol,card)
> and change
> protocol_for_each_card(&isapnp_card_protocol,card)
> back to
> protocol_for_each_card(&isapnp_protocol,card)
> This changes fix compilation problems, but may be it wrong do it in this
> way.
>
> Best regards.
> Ruslan.
>

Hi Ruslan,

This is indeed a correct fix for this problem. This bug was not introduced
by me but I appreciate your input.

Thanks,
Adam