From 3f8b4354275f78baa054a0c340ca4f4d64380b20 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 25 Jun 1996 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1996-06-25 --- pc/ether82557.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pc/ether82557.c b/pc/ether82557.c index 67e3fbac55044d14355370c3c03c209e40e011da..53f4dcd4636b63172d89811173f9e445ce63b5ff 100644 --- a/pc/ether82557.c +++ b/pc/ether82557.c @@ -6,6 +6,7 @@ * the PCI scanning code could be made common to other adapters; * PCI code needs rewritten to handle byte, word, dword accesses * and using the devno as a bus+dev+function triplet; + * auto-negotiation; * optionally use memory-mapped registers. */ #include "u.h" @@ -725,11 +726,18 @@ reset(Ether* ether) if(x != 0x80017) continue; - x = dp83840r(ctlr, i, 0x1B); - if((x & 0x0200) == 0){ + x = dp83840r(ctlr, i, 0x19); + if((x & 0x0040) == 0){ + ether->mbps = 100; ctlr->configdata[8] = 1; ctlr->configdata[15] &= ~0x80; - ether->mbps = 100; + } + else{ + x = dp83840r(ctlr, i, 0x1B); + if((x & 0x0200) == 0){ + ctlr->configdata[8] = 1; + ctlr->configdata[15] &= ~0x80; + } } break; }