qlge: bugfix: Pad outbound frames smaller than 60 bytes.
authorRon Mercer <ron.mercer@qlogic.com>
Mon, 9 Mar 2009 10:59:27 +0000 (10:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2009 11:43:58 +0000 (04:43 -0700)
With some asic configurations xmit of frames smaller than 60 bytes may
fail.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index ce826da6f1656f6467e36f965866c79443c7c5dc..189584684aae1e9560845b53d081d716a736f150 100644 (file)
@@ -2057,6 +2057,9 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
 
        tx_ring = &qdev->tx_ring[tx_ring_idx];
 
+       if (skb_padto(skb, ETH_ZLEN))
+               return NETDEV_TX_OK;
+
        if (unlikely(atomic_read(&tx_ring->tx_count) < 2)) {
                QPRINTK(qdev, TX_QUEUED, INFO,
                        "%s: shutting down tx queue %d du to lack of resources.\n",