patch-2.4.21 linux-2.4.21/drivers/net/3c523.c
Next file: linux-2.4.21/drivers/net/3c527.c
Previous file: linux-2.4.21/drivers/net/3c515.c
Back to the patch index
Back to the overall index
- Lines: 26
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/3c523.c
- Orig date:
2002-02-25 11:37:59.000000000 -0800
diff -urN linux-2.4.20/drivers/net/3c523.c linux-2.4.21/drivers/net/3c523.c
@@ -212,10 +212,11 @@
volatile struct iscp_struct *iscp; /* volatile is important */
volatile struct scb_struct *scb; /* volatile is important */
volatile struct tbd_struct *xmit_buffs[NUM_XMIT_BUFFS];
- volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
#if (NUM_XMIT_BUFFS == 1)
+ volatile struct transmit_cmd_struct *xmit_cmds[2];
volatile struct nop_cmd_struct *nop_cmds[2];
#else
+ volatile struct transmit_cmd_struct *xmit_cmds[NUM_XMIT_BUFFS];
volatile struct nop_cmd_struct *nop_cmds[NUM_XMIT_BUFFS];
#endif
volatile int nop_point, num_recv_buffs;
@@ -1121,8 +1122,11 @@
netif_stop_queue(dev);
- memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
len = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
+
+ if(len != skb->len)
+ memset((char *) p->xmit_cbuffs[p->xmit_count], 0, ETH_ZLEN);
+ memcpy((char *) p->xmit_cbuffs[p->xmit_count], (char *) (skb->data), skb->len);
#if (NUM_XMIT_BUFFS == 1)
#ifdef NO_NOPCOMMANDS
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)