From a57a53047bfa429cbbaae3c3b293ba320fc524bb Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 10 May 2002 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2002-05-10 --- pc/etherelnk3.c | 20 +++++++++++++------- pc/vgasavage.c | 3 +++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pc/etherelnk3.c b/pc/etherelnk3.c index 59d037204f07927bf57207fc7184c62b5ac137df..2d752dc21dc334e39bd6fe72fbc5a46dc9b559ad 100644 --- a/pc/etherelnk3.c +++ b/pc/etherelnk3.c @@ -1776,7 +1776,7 @@ int etherelnk3reset(Ether* ether) { int anar, anlpar, phyaddr, phystat, timeo, xcvr; - int busmaster, did, i, j, port, rxearly, rxstatus9, x; + int busmaster, did, i, ismii, j, port, rxearly, rxstatus9, x; Block *bp, **bpp; Adapter *ap; uchar ea[Eaddrlen]; @@ -1828,19 +1828,25 @@ etherelnk3reset(Ether* ether) * Read the DeviceID from the EEPROM, it's at offset 0x03, * and do something depending on capabilities. */ + ismii = 0; switch(did = eepromdata(did, port, 0x03)){ + case 0x9055: + case 0x9200: + case 0x7646: /* 3CSOHO100-TX */ + case 0x5157: /* 3C575 Cyclone */ + case 0x6056: + ismii = 1; + /*FALLTHROUGH*/ case 0x9000: case 0x9001: case 0x9005: case 0x9050: case 0x9051: - case 0x9055: - case 0x9200: - case 0x7646: /* 3CSOHO100-TX */ - case 0x5157: /* 3C575 Cyclone */ - if(BUSTYPE(ether->tbdf) != BusPCI) + if(BUSTYPE(ether->tbdf) != BusPCI){ + ismii = 0; goto buggery; + } busmaster = 2; goto vortex; @@ -1914,7 +1920,7 @@ etherelnk3reset(Ether* ether) /* * forgive me, but i am weak */ - if(did == 0x9055 || did == 0x7646 || did == 0x9200 || did == 0x5157){ + if(ismii){ xcvr = xcvrMii; txrxreset(port); XCVRDEBUG("905[BC] reset ops 0x%uX\n", ins(port+ResetOp905B)); diff --git a/pc/vgasavage.c b/pc/vgasavage.c index c539904328fd040780a37902f0d16a4458172658..b2a183cfe8e722488ebe300d55aeb0231575a0ec 100644 --- a/pc/vgasavage.c +++ b/pc/vgasavage.c @@ -18,6 +18,7 @@ enum { SAVAGE3D = 0x8A20, /* PCI DID */ SAVAGE3DMV = 0x8A21, SAVAGE4 = 0x8A22, + SAVAGE4A = 0x8A26, SAVAGEMXMV = 0x8C10, SAVAGEMX = 0x8C11, SAVAGEIXMV = 0x8C12, @@ -362,6 +363,7 @@ savagewaitidle(VGAscr *scr) switch(scr->id){ case SAVAGE4: + case SAVAGE4A: /* wait for engine idle and FIFO empty */ statw = (ulong*)((uchar*)scr->mmio+AltStatus0); mask = CBEMask | Ge2Idle; @@ -490,6 +492,7 @@ savageinit(VGAscr *scr) /* if you add chip IDs here be sure to update savagewaitidle */ switch(scr->id){ case SAVAGE4: + case SAVAGE4A: case SAVAGEIXMV: case SUPERSAVAGEIXC16: case SAVAGEMXMV: