Adam Belay wrote: > Here's the patch. Any testing would be appreciated. Tested with two more ISA-Pnp soundcards, ES1868 and OPTi 82c933, and their ALSA drivers, snd-es18xx and snd-opti93x, and both work the same as they do without the patch (not quite right that is, but nothing to do with PnP). Also tested with ISA-PnP IDE (on the ES1868), ISA-PnP NE2000 (RTL8019), and ISA-PnP modem. All fine. Minor point about the patch itself though. In pnp.h, you do: > -#define pnp_port_valid(dev,bar) (pnp_port_flags((dev),(bar)) & > IORESOURCE_IO) > +#define pnp_port_valid(dev,bar) \ + > ((pnp_port_flags((dev),(bar)) & IORESOURCE_IO) && \ + > !(pnp_port_flags((dev),(bar)) & IORESOURCE_UNSET)) and the same for mem,irq,dma. It seems you could roll these two tests into one with: #define pnp_port_valid(dev,bar) \ ((pnp_port_flags((dev),(bar)) & (IORESOURCE_IO | IORESOURCE_UNSET)) == IORESOURCE_IO) Basically just an optimisation I guess (just checked and gcc doesn't do this itself) but this also stops the macro arguments from being accessed more than once. One more point, in isapnp/core.c:isapnp_set_resources() > - for (tmp = 0; tmp < PNP_MAX_PORT && res->port_resource[tmp].flags & IORESOURCE_IO; tmp++) > + for (tmp = 0; tmp < PNP_MAX_PORT && !(res->port_resource[tmp].flags & IORESOURCE_UNSET); tmp++) and again same for mem,irq,dma. That is, it goes from only checking IORESOURCE_ to only checking IORESOURCE_UNSET. Also checking for the type does sound like a valid sanity check, so would it be better to also check both flags here? Ie: for (tmp = 0; tmp < PNP_MAX_PORT && (res->port_resource[tmp].flags & (IORESOURCE_IO | IORESOURCE_UNSET)) == IORESOURCE_IO; tmp++) Incremental patch attached, in case you agree. Compiled, booted and tested. Rene.