*** ata-card.c.orig Sun Jan 26 11:47:46 2003 --- ata-card.c Sun Jan 26 12:44:45 2003 *************** *** 48,60 **** { u_int32_t fcn = PCCARD_FUNCTION_UNSPEC; int error = 0; error = pccard_get_function(dev, &fcn); if (error != 0) return (error); /* if it says its a disk we should register it */ ! if (fcn == PCCARD_FUNCTION_DISK) return (0); /* other devices might need to be matched here */ --- 48,64 ---- { u_int32_t fcn = PCCARD_FUNCTION_UNSPEC; int error = 0; + char *prodstr; + error = pccard_get_product_str(dev, &prodstr); + if (error != 0) + return (error); error = pccard_get_function(dev, &fcn); if (error != 0) return (error); /* if it says its a disk we should register it */ ! if (fcn == PCCARD_FUNCTION_DISK || !strcmp(prodstr, "NinjaATA-")) return (0); /* other devices might need to be matched here */ *************** *** 79,84 **** --- 83,91 ---- struct resource *io; int rid, len, start, end; u_long tmp; + char *prodstr; + + pccard_get_product_str(dev, &prodstr); /* allocate the io range to get start and length */ rid = ATA_IOADDR_RID; *************** *** 111,118 **** start + ATA_ALTOFFSET, ATA_ALTIOSIZE); } } ! else ! return ENOMEM; ch->unit = 0; ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE); --- 118,127 ---- start + ATA_ALTOFFSET, ATA_ALTIOSIZE); } } ! else { ! if (strcmp (prodstr, "NinjaATA-")) ! return ENOMEM; ! } ch->unit = 0; ch->flags |= (ATA_USE_16BIT | ATA_NO_SLAVE);