I ran across the following code in src/devices/pnp_device.c:
void pnp_set_drq(device_t dev, unsigned drq, unsigned index) { /* Index == 0x74 */ pnp_write_config(dev, index, drq & 0xff); }
static void pnp_set_resource(device_t dev, struct resource *resource) { ...
/* Now store the resource */ if (resource->flags & IORESOURCE_IO) { pnp_set_iobase(dev, resource->index, resource->base); } else if (resource->flags & IORESOURCE_DRQ) { pnp_set_drq(dev, resource->index, resource->base); }
... }
The declaration of pnp_set_drq() looks backwards to me. Shouldn't it be
void pnp_set_drq(device_t dev, unsigned index, unsigned drq)
to match the way it's being called?
Steve Magnani Digital Design Corporation www.digidescorp.com