From 950a2754087b1e727127934a743c3efda8bb8a1b Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 18 Oct 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-10-18 --- pc/ether509.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pc/ether509.c b/pc/ether509.c index 891beb2ac3444e353f09aeb6df617ca2cb7515ed..94dba6aaf5e48118386d390a294b525b998589d1 100644 --- a/pc/ether509.c +++ b/pc/ether509.c @@ -669,17 +669,25 @@ ether509reset(Ether *ether) ea[eax] = (x>>8) & 0xFF; ea[eax+1] = x & 0xFF; } - if(pcicfg == 0) - acr = ins(port+AddressConfig); - else{ + if(pcicfg){ ether->irq = pcicfg->irq; - acr = Xcvr10BaseT; COMMAND(port, SelectWindow, 3); + acr = XcvrAUI; l = inl(port+InternalCgf); - l &= ~0x700000; - outl(port+InternalCgf, l); + switch(l & 0x700000){ + + case 0x000000: + acr = Xcvr10BaseT; + break; + + case 0x300000: + acr = XcvrBNC; + break; + } free(pcicfg); } + else + acr = ins(port+AddressConfig); /* * Finished with window 0. Now set the ethernet address