Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[pandora-kernel.git] / drivers / net / 8139cp.c
index 458dd9f..e8c9f27 100644 (file)
@@ -448,8 +448,7 @@ static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
        spin_lock_irqsave(&cp->lock, flags);
        cp->cpcmd &= ~RxVlanOn;
        cpw16(CpCmd, cp->cpcmd);
-       if (cp->vlgrp)
-               cp->vlgrp->vlan_devices[vid] = NULL;
+       vlan_group_set_device(cp->vlgrp, vid, NULL);
        spin_unlock_irqrestore(&cp->lock, flags);
 }
 #endif /* CP_VLAN_TAG_USED */
@@ -574,7 +573,6 @@ rx_status_loop:
                }
 
                skb_reserve(new_skb, RX_OFFSET);
-               new_skb->dev = dev;
 
                pci_unmap_single(cp->pdev, mapping,
                                 buflen, PCI_DMA_FROMDEVICE);
@@ -617,13 +615,15 @@ rx_next:
         * this round of polling
         */
        if (rx_work) {
+               unsigned long flags;
+
                if (cpr16(IntrStatus) & cp_rx_intr_mask)
                        goto rx_status_loop;
 
-               local_irq_disable();
+               local_irq_save(flags);
                cpw16_f(IntrMask, cp_intr_mask);
                __netif_rx_complete(dev);
-               local_irq_enable();
+               local_irq_restore(flags);
 
                return 0;       /* done */
        }
@@ -763,17 +763,18 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
        struct cp_private *cp = netdev_priv(dev);
        unsigned entry;
        u32 eor, flags;
+       unsigned long intr_flags;
 #if CP_VLAN_TAG_USED
        u32 vlan_tag = 0;
 #endif
        int mss = 0;
 
-       spin_lock_irq(&cp->lock);
+       spin_lock_irqsave(&cp->lock, intr_flags);
 
        /* This is a hard error, log it. */
        if (TX_BUFFS_AVAIL(cp) <= (skb_shinfo(skb)->nr_frags + 1)) {
                netif_stop_queue(dev);
-               spin_unlock_irq(&cp->lock);
+               spin_unlock_irqrestore(&cp->lock, intr_flags);
                printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
                       dev->name);
                return 1;
@@ -805,7 +806,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                if (mss)
                        flags |= LargeSend | ((mss & MSSMask) << MSSShift);
                else if (skb->ip_summed == CHECKSUM_PARTIAL) {
-                       const struct iphdr *ip = skb->nh.iph;
+                       const struct iphdr *ip = ip_hdr(skb);
                        if (ip->protocol == IPPROTO_TCP)
                                flags |= IPCS | TCPCS;
                        else if (ip->protocol == IPPROTO_UDP)
@@ -824,7 +825,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
                u32 first_len, first_eor;
                dma_addr_t first_mapping;
                int frag, first_entry = entry;
-               const struct iphdr *ip = skb->nh.iph;
+               const struct iphdr *ip = ip_hdr(skb);
 
                /* We must give this initial chunk to the device last.
                 * Otherwise we could race with the device.
@@ -906,7 +907,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
        if (TX_BUFFS_AVAIL(cp) <= (MAX_SKB_FRAGS + 1))
                netif_stop_queue(dev);
 
-       spin_unlock_irq(&cp->lock);
+       spin_unlock_irqrestore(&cp->lock, intr_flags);
 
        cpw8(TxPoll, NormalTxPoll);
        dev->trans_start = jiffies;
@@ -1080,7 +1081,6 @@ static int cp_refill_rx (struct cp_private *cp)
                if (!skb)
                        goto err_out;
 
-               skb->dev = cp->dev;
                skb_reserve(skb, RX_OFFSET);
 
                mapping = pci_map_single(cp->pdev, skb->data, cp->rx_buf_sz,