Index: ata-card.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-card.c,v retrieving revision 1.5 diff -u -r1.5 ata-card.c --- ata-card.c 14 Sep 2002 18:59:32 -0000 1.5 +++ ata-card.c 19 Sep 2002 17:21:32 -0000 @@ -46,6 +46,8 @@ #include #include +#define KME_IO 0x1 + static int ata_pccard_match(device_t dev) { @@ -72,6 +74,7 @@ struct resource *io; int rid, len, start, end; u_long tmp; + int flags = device_get_flags(dev); /* allocate the io range to get start and length */ rid = ATA_IOADDR_RID; @@ -102,6 +105,16 @@ else { bus_set_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID, start + ATA_ALTOFFSET, ATA_ALTIOSIZE); + } + if (flags & KME_IO) { + rid = ATA_ALTADDR_RID; + io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, + 0, ~0, ATA_ALTIOSIZE + 1, RF_ACTIVE); + if (io) { + bus_space_write_1(rman_get_bustag(io), + rman_get_bushandle(io), 1, 0x81); + bus_release_resource(dev, SYS_RES_IOPORT, rid, io); + } } } else