net: usb: raw-ip: Fix autopm / system suspend issues.
[linux-2.6.git] / drivers / net / tg3.c
index dc3fbf6..d469004 100644 (file)
@@ -6029,12 +6029,12 @@ static void tg3_tx_skb_unmap(struct tg3_napi *tnapi, u32 entry, int last)
 
 /* Workaround 4GB and 40-bit hardware DMA bugs. */
 static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
-                                      struct sk_buff *skb,
+                                      struct sk_buff **pskb,
                                       u32 *entry, u32 *budget,
                                       u32 base_flags, u32 mss, u32 vlan)
 {
        struct tg3 *tp = tnapi->tp;
-       struct sk_buff *new_skb;
+       struct sk_buff *new_skb, *skb = *pskb;
        dma_addr_t new_addr = 0;
        int ret = 0;
 
@@ -6076,7 +6076,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
        }
 
        dev_kfree_skb(skb);
-
+       *pskb = new_skb;
        return ret;
 }
 
@@ -6234,12 +6234,10 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
                }
        }
 
-#ifdef BCM_KERNEL_SUPPORTS_8021Q
        if (vlan_tx_tag_present(skb)) {
                base_flags |= TXD_FLAG_VLAN;
                vlan = vlan_tx_tag_get(skb);
        }
-#endif
 
        if (tg3_flag(tp, USE_JUMBO_BDFLAG) &&
            !mss && skb->len > VLAN_ETH_FRAME_LEN)
@@ -6307,7 +6305,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
                 */
                entry = tnapi->tx_prod;
                budget = tg3_tx_avail(tnapi);
-               if (tigon3_dma_hwbug_workaround(tnapi, skb, &entry, &budget,
+               if (tigon3_dma_hwbug_workaround(tnapi, &skb, &entry, &budget,
                                                base_flags, mss, vlan))
                        goto out_unlock;
        }
@@ -15579,7 +15577,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev)
 
                cancel_work_sync(&tp->reset_task);
 
-               if (!tg3_flag(tp, USE_PHYLIB)) {
+               if (tg3_flag(tp, USE_PHYLIB)) {
                        tg3_phy_fini(tp);
                        tg3_mdio_fini(tp);
                }