diff --git a/src/sys/isa/ne2k.c b/src/sys/isa/ne2k.c index 14962fa..8cb0cf5 100644 --- a/src/sys/isa/ne2k.c +++ b/src/sys/isa/ne2k.c @@ -37,6 +37,7 @@ #include #include #include +#include static int dp_pkt2user(struct device *dev,int page,int length); @@ -123,6 +124,7 @@ kpanic("Device Not Ready\n"); } + assert(length); if ((word16 == 1) && (length & 0x01)) { length++; } @@ -165,9 +167,12 @@ int i; uInt16 *packet16 = (uInt16 *)packet; + assert(length); + if (length & 0x01) length++; + outportByte(dev->ioAddr+EN0_RCNTLO,(length & 0xFF)); outportByte(dev->ioAddr+EN0_RCNTHI,(length >> 8)); @@ -349,6 +354,10 @@ /*** $Log$ + Revision 1.14 2004/07/14 12:03:50 reddawg + ne2k: ne2kInit to ne2k_init + Changed Startup Routines + Revision 1.13 2004/06/04 10:19:42 reddawg notes: we compile again, thank g-d anyways i was about to cry