[<prev] [next>] [day] [month] [year] [list]
Message-ID: <40680C535D6FE6498883F1640FACD44D011432DC@ka-exchange-1.kontronamerica.local>
Date: Mon, 16 Jul 2012 13:05:49 -0700
From: "Andy Cress" <andy.cress@...kontron.com>
To: <netdev@...r.kernel.org>
Subject: [PATCH 4/4] pch_gbe: vlan skb len fix
Author: Veaceslav Falico <vfalico@...hat.com>
Date: Tue Apr 10 08:14:17 2012 +0200
pch_gbe_xmit_frame skb->len verification was incorrect in vlan case
causing bogus transfer length errors. One correction could be:
offset = skb->protocol == htons(ETH_P_8021Q) ? 0 : 4;
if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - offset)))
However, this verification is not necessary, so remove it.
Merged-by: Andy Cress <andy.cress@...kontron.com>
Signed-off-by: Andy Cress <andy.cress@...kontron.com>
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 2ccdca6..5eaac7f 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -2160,13 +2160,6 @@ static int pch_gbe_xmit_frame(struct sk_buff
*skb, struct net_device *netdev)
struct pch_gbe_tx_ring *tx_ring = adapter->tx_ring;
unsigned long flags;
- if (unlikely(skb->len > (adapter->hw.mac.max_frame_size - 4))) {
- pr_err("Transfer length Error: skb len: %d > max: %d\n",
- skb->len, adapter->hw.mac.max_frame_size);
- dev_kfree_skb_any(skb);
- adapter->stats.tx_length_errors++;
- return NETDEV_TX_OK;
- }
if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags)) {
/* Collision - tell upper layer to requeue */
return NETDEV_TX_LOCKED;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists