]> Zhao Yanbai Git Server - minix.git/commitdiff
Workaround for fishy situation that caused checksum on outgoing packets
authorBen Gras <ben@minix3.org>
Wed, 22 Jun 2005 15:22:34 +0000 (15:22 +0000)
committerBen Gras <ben@minix3.org>
Wed, 22 Jun 2005 15:22:34 +0000 (15:22 +0000)
to be broken in certain cases. (Seemingly when 2 short packets sent
back-to-back.) Buffer alignment seems to fix this ...

drivers/fxp/fxp.c

index 8dfca6a1c20df4177c4302252e822f5dd4fbcaec..91f0b8ffac424513863a9361e5168547c700ac52 100644 (file)
@@ -806,10 +806,10 @@ fxp_t *fp;
                assert(first_time);
                first_time= 0;
 
-#if 0
-               assert(tot_bufsize <= buffer);
-#endif
+#define BUFALIGN       4096
+               assert(tot_bufsize <= sizeof(buffer)-BUFALIGN); 
                buf= (phys_bytes)buffer;
+               buf += BUFALIGN - (buf % BUFALIGN);
        }
 
        fp->fxp_rx_buf= (struct rfd *)buf;