summaryrefslogtreecommitdiff
path: root/os/pc/ether2000.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
committerCharles.Forsyth <devnull@localhost>2007-04-07 12:52:27 +0000
commite1bd49a1e1823eab71c293efd1bd0c9b83c350c9 (patch)
treea9424cde16004cb9e591045225bc61beed339dd5 /os/pc/ether2000.c
parent15345f9c75c069d3e2e362af5d6f931eef7772ef (diff)
20070407-1350 more updates from plan 9 pc kernel, and a few unreachable fixes(!)
Diffstat (limited to 'os/pc/ether2000.c')
-rw-r--r--os/pc/ether2000.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/pc/ether2000.c b/os/pc/ether2000.c
index 4ea8fd4f..8fc8911e 100644
--- a/os/pc/ether2000.c
+++ b/os/pc/ether2000.c
@@ -132,7 +132,6 @@ ne2000pnp(Ether* edev)
static int
ne2000reset(Ether* edev)
{
- static int first;
ushort buf[16];
ulong port;
Dp8390 *dp8390;
@@ -198,11 +197,14 @@ ne2000reset(Ether* edev)
* initialisation has been tried, but that wouldn't be
* enough, there are other ethernet boards which could
* match.
+ * Parallels has buf[0x0E] == 0x00 whereas real hardware
+ * usually has 0x57.
*/
dp8390reset(edev);
memset(buf, 0, sizeof(buf));
dp8390read(dp8390, buf, 0, sizeof(buf));
- if((buf[0x0E] & 0xFF) != 0x57 || (buf[0x0F] & 0xFF) != 0x57){
+ i = buf[0x0E] & 0xFF;
+ if((i != 0x00 && i != 0x57) || (buf[0x0F] & 0xFF) != 0x57){
iofree(edev->port);
free(edev->ctlr);
return -1;