netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] r8169: use hardware auto-padding.
@ 2009-03-15 11:09 Francois Romieu
  2009-03-16  3:04 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Romieu @ 2009-03-15 11:09 UTC (permalink / raw)
  To: David S. Miller
  Cc: Dave Jones, Mikael Pettersson, Tim Durack, ivecera, netdev

It shortens the code and fixes the current pci_unmap leak with
padded skb reported by Dave Jones.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
---
 drivers/net/r8169.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index b347340..352da2a 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3363,13 +3363,6 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		opts1 |= FirstFrag;
 	} else {
 		len = skb->len;
-
-		if (unlikely(len < ETH_ZLEN)) {
-			if (skb_padto(skb, ETH_ZLEN))
-				goto err_update_stats;
-			len = ETH_ZLEN;
-		}
-
 		opts1 |= FirstFrag | LastFrag;
 		tp->tx_skb[entry].skb = skb;
 	}
@@ -3407,7 +3400,6 @@ out:
 err_stop:
 	netif_stop_queue(dev);
 	ret = NETDEV_TX_BUSY;
-err_update_stats:
 	dev->stats.tx_dropped++;
 	goto out;
 }
-- 
1.6.0.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] r8169: use hardware auto-padding.
  2009-03-15 11:09 [PATCH 1/2] r8169: use hardware auto-padding Francois Romieu
@ 2009-03-16  3:04 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-03-16  3:04 UTC (permalink / raw)
  To: romieu; +Cc: davej, mikpe, tdurack, ivecera, netdev

From: Francois Romieu <romieu@fr.zoreil.com>
Date: Sun, 15 Mar 2009 12:09:54 +0100

> It shortens the code and fixes the current pci_unmap leak with
> padded skb reported by Dave Jones.
> 
> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-16  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-15 11:09 [PATCH 1/2] r8169: use hardware auto-padding Francois Romieu
2009-03-16  3:04 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).