From e1bd49a1e1823eab71c293efd1bd0c9b83c350c9 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sat, 7 Apr 2007 12:52:27 +0000 Subject: 20070407-1350 more updates from plan 9 pc kernel, and a few unreachable fixes(!) --- os/pc/ether2000.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'os/pc/ether2000.c') 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; -- cgit v1.2.3