Commit 054309ed authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix padding for 3c505

All backports from the 2.4 code
parent 68fd20d3
......@@ -1037,8 +1037,9 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb)
adapter->current_dma.direction = 1;
adapter->current_dma.start_time = jiffies;
if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS) {
if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS || nlen != skb->len) {
memcpy(adapter->dma_buffer, skb->data, nlen);
memset(adapter->dma_buffer+skb->len, 0, nlen-skb->len);
target = isa_virt_to_bus(adapter->dma_buffer);
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment