]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/skge.c
Merge branch 'upstream-fixes'
[linux-2.6-omap-h63xx.git] / drivers / net / skge.c
index 596c93b12daad126b18e9ae305bd2c1c8f695687..8b6e2a11e28d58a893c24761e18d3d9ac112c7cf 100644 (file)
@@ -2280,11 +2280,13 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        }
 
        if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) {
-               netif_stop_queue(dev);
-               spin_unlock_irqrestore(&skge->tx_lock, flags);
+               if (!netif_stopped(dev)) {
+                       netif_stop_queue(dev);
 
-               printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",
-                      dev->name);
+                       printk(KERN_WARNING PFX "%s: ring full when queue awake!\n",
+                              dev->name);
+               }
+               spin_unlock_irqrestore(&skge->tx_lock, flags);
                return NETDEV_TX_BUSY;
        }
 
@@ -2300,14 +2302,12 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
        td->dma_hi = map >> 32;
 
        if (skb->ip_summed == CHECKSUM_HW) {
-               const struct iphdr *ip
-                       = (const struct iphdr *) (skb->data + ETH_HLEN);
                int offset = skb->h.raw - skb->data;
 
                /* This seems backwards, but it is what the sk98lin
                 * does.  Looks like hardware is wrong?
                 */
-               if (ip->protocol == IPPROTO_UDP
+               if (skb->h.ipiph->protocol == IPPROTO_UDP
                    && hw->chip_rev == 0 && hw->chip_id == CHIP_ID_YUKON)
                        control = BMU_TCP_CHECK;
                else