From 04a3a0538127fc5aa161d4af53c479cd5e49e2e6 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 21 Apr 2001 07:08:03 +0000 Subject: [PATCH] Set the device name for NEC PC98 PCMCIA Controller on boot. # We really need to allocate i/o ports for it, but I need to learn # the pc98 bus space better before attempting that. --- sys/pccard/pcic.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index 809ba7d1781..5dff359f33b 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -479,28 +479,29 @@ pcic_probe(device_t dev) } } bus_release_resource(dev, SYS_RES_IOPORT, rid, r); + if (validslots != 0) + return (0); #ifdef PC98 - if (validslots == 0) { - sp = &pcic_slots[validunits * PCIC_CARD_SLOTS]; - if (inb(PCIC98_REG0) != 0xff) { - sp->controller = PCIC_PC98; - sp->revision = 0; - cinfo.mapmem = pcic98_memory; - cinfo.mapio = pcic98_io; - cinfo.power = pcic98_power; - cinfo.mapirq = pcic98_mapirq; - cinfo.reset = pcic98_reset; - cinfo.disable = pcic98_disable; - cinfo.resume = pcic98_resume; - cinfo.maxmem = 1; + sp = &pcic_slots[validunits * PCIC_CARD_SLOTS]; + if (inb(PCIC98_REG0) != 0xff) { + sp->controller = PCIC_PC98; + sp->revision = 0; + cinfo.mapmem = pcic98_memory; + cinfo.mapio = pcic98_io; + cinfo.power = pcic98_power; + cinfo.mapirq = pcic98_mapirq; + cinfo.reset = pcic98_reset; + cinfo.disable = pcic98_disable; + cinfo.resume = pcic98_resume; + cinfo.maxmem = 1; #if 0 - cinfo.maxio = 1; + cinfo.maxio = 1; #else - cinfo.maxio = 2; /* fake for UE2212 LAN card */ + cinfo.maxio = 2; /* fake for UE2212 LAN card */ #endif - validslots++; - /* XXX Do I need to allocated the port resources? */ - } + validslots++; + /* XXX Do I need to allocated the port resources? */ + device_set_desc(dev, "NEC PC98 Original PCMCIA Controller"); } #endif /* PC98 */ return(validslots ? 0 : ENXIO);