Commit 53168dd6 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix padding on 8390 based devices

parent 4783c646
......@@ -270,6 +270,7 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct ei_device *ei_local = (struct ei_device *) dev->priv;
int length, send_length, output_page;
unsigned long flags;
char scratch[ETH_ZLEN];
length = skb->len;
......@@ -341,7 +342,14 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
* trigger the send later, upon receiving a Tx done interrupt.
*/
if (length == send_length)
ei_block_output(dev, length, skb->data, output_page);
else {
memset(scratch, 0, ETH_ZLEN);
memcpy(scratch, skb->data, skb->len);
ei_block_output(dev, ETH_ZLEN, scratch, output_page);
}
if (! ei_local->txing)
{
ei_local->txing = 1;
......@@ -373,7 +381,13 @@ static int ei_start_xmit(struct sk_buff *skb, struct net_device *dev)
* reasonable hardware if you only use one Tx buffer.
*/
if (length == send_length)
ei_block_output(dev, length, skb->data, ei_local->tx_start_page);
else {
memset(scratch, 0, ETH_ZLEN);
memcpy(scratch, skb->data, skb->len);
ei_block_output(dev, ETH_ZLEN, scratch, ei_local->tx_start_page);
}
ei_local->txing = 1;
NS8390_trigger_send(dev, send_length, ei_local->tx_start_page);
dev->trans_start = jiffies;
......
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