Re: oops in 2.3.37, isapnp error??

From: Martin Mares (mj@suse.cz)
Date: Sat Jan 08 2000 - 12:20:45 EST


Hello,

> 2.3.38 is generating the same oops (as I posted earlier) as 2.3.37
> while performing the probe of PnP devices (I have an ISA PnP ESS1688
> based sound card)

   Please try out this patch.

                                Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
"You might have mail."

--- drivers/pnp/isapnp_proc.c.mj Sat Jan 8 17:56:12 2000 +++ drivers/pnp/isapnp_proc.c Sat Jan 8 18:04:51 2000 @@ -533,10 +533,9 @@ static void isapnp_info_read(isapnp_info_buffer_t *buffer) { - struct list_head *card_list; - - for (card_list = isapnp_cards.next; card_list != &isapnp_cards; card_list = card_list->next) { - struct pci_bus *card = list_entry(card_list, struct pci_bus, node); + struct pci_bus *card; + + isapnp_for_each_card(card) { struct list_head *dev_list; isapnp_printf(buffer, "Card %i '", card->number); @@ -547,10 +546,8 @@ if (card->productver) isapnp_printf(buffer, " Product version %x.%x", card->productver >> 4, card->productver & 0x0f); isapnp_printf(buffer,"\n"); - for (dev_list = card->devices.next; dev_list != &card->devices; dev_list = dev_list->next) { - struct pci_dev *dev = list_entry(dev_list, struct pci_dev, bus_list); - isapnp_print_device(buffer, dev); - } + for (dev_list = card->devices.next; dev_list != &card->devices; dev_list = dev_list->next) + isapnp_print_device(buffer, pci_dev_b(dev_list)); } } @@ -644,12 +641,13 @@ isapnp_info_device = NULL; isapnp_get_str(index, line, sizeof(index)); csn = simple_strtoul(index, NULL, 0); + for (list = isapnp_cards.next; list != &isapnp_cards; list = list->next) { - isapnp_info_card = list_entry(list, struct pci_bus, node); + isapnp_info_card = pci_bus_b(list); if (isapnp_info_card->number == csn) break; } - if (isapnp_info_card == NULL) { + if (list == &isapnp_cards) { printk("isapnp: cannot find CSN %i\n", csn); return 1; } --- drivers/pnp/isapnp.c.mj Sat Jan 8 18:13:31 2000 +++ drivers/pnp/isapnp.c Sat Jan 8 18:13:31 2000 @@ -1000,6 +1000,7 @@ 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); }

- 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/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST