lkml.org 
[lkml]   [2000]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.3.38 breaks isapnp as module
On Sun, 9 Jan 2000, Martin Mares wrote:

> Hello,
>
> > quirks.c doesn't include any code to be compiled as module.
> > result is:
> >
> > # insmod quirks
> > Using /lib/modules/2.3.38/misc/quirks.o
> > /lib/modules/2.3.38/misc/quirks.o: couldn't find the kernel
> > version the module was compiled for

Mea culpa. I didn't try it as a module. I'll know next time...

> pre-2.3.39-2 together with this patch should fix it:
>
> --- drivers/pnp/isapnp.c.mj Sun Jan 9 11:05:25 2000
> +++ drivers/pnp/isapnp.c Sun Jan 9 11:05:25 2000
> @@ -982,11 +982,11 @@
> card->device = (header[3] << 8) | header[2];
> card->serial = (header[7] << 24) | (header[6] << 16) | (header[5] << 8) | header[4];
> isapnp_checksum_value = 0x00;
> + INIT_LIST_HEAD(&card->devices);
> isapnp_parse_resource_map(card);
> if (isapnp_checksum_value != 0x00)
> printk("isapnp: checksum for device %i is not valid (0x%x)\n", csn, isapnp_checksum_value);
> card->checksum = isapnp_checksum_value;
> - INIT_LIST_HEAD(&card->devices);
>
> list_add_tail(&card->node, &isapnp_cards);
> }

It'll fix the immediate bug, but there is still an uninitialized
list_head lurking in the struct pci_dev, unless you also add a

INIT_LIST_HEAD(&card->children);

Granted it may not be used, but not initializing it is bad. Should we
export alloc_pci_bus from drivers/pci/pci.c and use that, which does the
correct inits? The other changes for hot-plugging seem to be going this
way (obviously named functions that encapsulate the innards of everything
dealing with the struct pci_dev).

--
Peter Denison <peterd@pnd-pc.demon.co.uk>
Linux Driver for Promise DC4030VL cards.
See http://www.pnd-pc.demon.co.uk/promise/promise.html for details


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:1.864 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site