patch-2.4.21 linux-2.4.21/drivers/net/3c505.c
Next file: linux-2.4.21/drivers/net/3c507.c
Previous file: linux-2.4.21/drivers/net/3c501.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/3c505.c
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.20/drivers/net/3c505.c linux-2.4.21/drivers/net/3c505.c
@@ -1036,8 +1036,9 @@
adapter->current_dma.direction = 1;
adapter->current_dma.start_time = jiffies;
- if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS) {
- memcpy(adapter->dma_buffer, skb->data, nlen);
+ if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS || nlen != skb->len) {
+ memcpy(adapter->dma_buffer, skb->data, skb->len);
+ memset(adapter->dma_buffer+skb->len, 0, nlen-skb->len);
target = virt_to_bus(adapter->dma_buffer);
}
else {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)