[PATCH][2.5] Fix via-rhine using skb_padto

Roger Luethi (rl@hellgate.ch)
Tue, 14 Jan 2003 13:45:55 +0100


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-20910-1042548456-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

This patch has already made it into 2.4.21pre3-ac4. Please apply.

--=_courier-20910-1042548456-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="via-rhine.c-2.5.58-skb_padto.diff"

--- linux-2.5.58/drivers/net/via-rhine.c.org Tue Jan 14 00:41:30 2003
+++ linux-2.5.58/drivers/net/via-rhine.c Tue Jan 14 13:24:14 2003
@@ -1239,6 +1239,12 @@
/* Calculate the next Tx descriptor entry. */
entry = np->cur_tx % TX_RING_SIZE;

+ if (skb->len < ETH_ZLEN) {
+ skb = skb_padto(skb, ETH_ZLEN);
+ if(skb == NULL)
+ return 0;
+ }
+
np->tx_skbuff[entry] = skb;

if ((np->drv_flags & ReqTxAlign) &&

--=_courier-20910-1042548456-0001-2--