From 3caf1cf4eb464ef1479c05f470ef98528325868e Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 6 Sep 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-09-06 --- pc/devi82365.c | 15 +++++++-------- pc/devpccard.c | 5 +++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pc/devi82365.c b/pc/devi82365.c index 61486e692e3496ab4c86f8f39d6250bb7b88d153..261f9f17d08f64104895450da9eb3ab8f3d89b98 100644 --- a/pc/devi82365.c +++ b/pc/devi82365.c @@ -113,7 +113,6 @@ static PCMslot *lastslot; static nslot; static void i82365intr(Ureg*, void*); -static void i82365reset(void); static int pcmio(int, ISAConf*); static long pcmread(int, int, void*, long, vlong); static long pcmwrite(int, int, void*, long, vlong); @@ -355,7 +354,6 @@ pcmcia_pcmspecial(char *idstr, ISAConf *isa) extern char *strstr(char*, char*); int enabled; - i82365reset(); for(pp = slot; pp < lastslot; pp++){ if(pp->special) continue; /* already taken */ @@ -570,8 +568,8 @@ i82365dump(PCMslot *pp) /* * set up for slot cards */ -static void -i82365reset(void) +void +devi82365link(void) { static int already; int i, j; @@ -579,6 +577,10 @@ i82365reset(void) PCMslot *pp; char buf[32]; + if(already) + return; + already = 1; + if (!getconf("pcmcia0")) return; @@ -590,9 +592,6 @@ i82365reset(void) _pcmspecial = pcmcia_pcmspecial; _pcmspecialclose = pcmcia_pcmspecialclose; - if(already) - return; - already = 1; /* look for controllers if the ports aren't already taken */ if(ioalloc(0x3E0, 2, 0, "i82365.0") >= 0){ @@ -869,7 +868,7 @@ Dev i82365devtab = { 'y', "i82365", - i82365reset, + devreset, devinit, i82365attach, i82365walk, diff --git a/pc/devpccard.c b/pc/devpccard.c index 3f66927f85854884e398fa61400e1fd289c7ea2a..88a49973d6a37ba7640ac8d24f7503bbe3cce514 100644 --- a/pc/devpccard.c +++ b/pc/devpccard.c @@ -481,6 +481,11 @@ devpccardlink(void) if (!getconf("pccard0")) return; + if (_pcmspecial) { + print("#Y: CardBus and PCMCIA at the same time?\n"); + return; + } + _pcmspecial = pccard_pcmspecial; _pcmspecialclose = pccard_pcmspecialclose;