diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-19 22:45:37 +0000 |
commit | 6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch) | |
tree | 0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/net/smc9194.c | |
parent | ecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff) |
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine
status unknown.
Diffstat (limited to 'drivers/net/smc9194.c')
-rw-r--r-- | drivers/net/smc9194.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index 661c1b363..86c04c5c7 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c @@ -45,10 +45,12 @@ . Fixed bug reported by Gardner Buchanan in . smc_enable, with outw instead of outb . 03/06/96 Erik Stahlman Added hardware multicast from Peter Cammaert + . 04/14/00 Heiko Pruessing (SMA Regelsysteme) Fixed bug in chip memory + . allocation ----------------------------------------------------------------------------*/ static const char *version = - "smc9194.c:v0.12 03/06/96 by Erik Stahlman (erik@vt.edu)\n"; + "smc9194.c:v0.13 04/14/00 by Erik Stahlman (erik@vt.edu)\n"; #include <linux/module.h> #include <linux/version.h> @@ -517,11 +519,15 @@ static int smc_wait_to_send_packet( struct sk_buff * skb, struct net_device * de length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; + /* - . the MMU wants the number of pages to be the number of 256 bytes - . 'pages', minus 1 ( since a packet can't ever have 0 pages :) ) + ** The MMU wants the number of pages to be the number of 256 bytes + ** 'pages', minus 1 ( since a packet can't ever have 0 pages :) ) + ** + ** Pkt size for allocating is data length +6 (for additional status words, + ** length and ctl!) If odd size last byte is included in this header. */ - numPages = length / 256; + numPages = ((length & 0xfffe) + 6) / 256; if (numPages > 7 ) { printk(CARDNAME": Far too big packet error. \n"); |