simple pnp bios io resources bug makes system unusable

From: CarlosRomero (
Date: Mon Jun 30 2003 - 22:38:17 EST

cat /sys/devices/pnp0/00\:0c/name
Reserved Motherboard Resources

cat /sys/devices/pnp0/00\:0c/resources
state = active
io 0x4d0-0x4d1
io 0xcf8-0xcff
io 0x3f7-0x3f7
io 0x401-0x407
io 0x298-0x298
io 0x00000000-0xffffffff
mem 0xfffe0000-0xffffffff
mem 0x100000-0x7ffffff

fixup: check for null io base, other devices are now able to initialize.

static void current_ioresource(struct pnp_resource_table * res, int io,
int len)
        int i = 0;
+ if (!io) return;
        while ((res->port_resource[i].flags & IORESOURCE_IO) && i <
        if (i < PNP_MAX_PORT) {
                res->port_resource[i].start = (unsigned long) io;
                res->port_resource[i].end = (unsigned long)(io + len - 1);
                res->port_resource[i].flags = IORESOURCE_IO; // Also
clears _UNSET flag

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:12 EST