Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[pandora-kernel.git] / drivers / net / starfire.c
index 337c3b7..9d6e454 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/ethtool.h>
 #include <linux/mii.h>
 #include <linux/if_vlan.h>
+#include <linux/mm.h>
 #include <asm/processor.h>             /* Processor type for cache alignment. */
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -632,7 +633,7 @@ static void check_duplex(struct net_device *dev);
 static void    tx_timeout(struct net_device *dev);
 static void    init_ring(struct net_device *dev);
 static int     start_tx(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
+static irqreturn_t intr_handler(int irq, void *dev_instance);
 static void    netdev_error(struct net_device *dev, int intr_status);
 static int     __netdev_rx(struct net_device *dev, int *quota);
 static void    refill_rx_ring(struct net_device *dev);
@@ -676,8 +677,7 @@ static void netdev_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
        spin_lock(&np->lock);
        if (debug > 1)
                printk("%s: removing vlanid %d from vlan filter\n", dev->name, vid);
-       if (np->vlgrp)
-               np->vlgrp->vlan_devices[vid] = NULL;
+       vlan_group_set_device(np->vlgrp, vid, NULL);
        set_rx_mode(dev);
        spin_unlock(&np->lock);
 }
@@ -1230,7 +1230,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
        }
 
 #if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE)
-       if (skb->ip_summed == CHECKSUM_HW) {
+       if (skb->ip_summed == CHECKSUM_PARTIAL) {
                if (skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK))
                        return NETDEV_TX_OK;
        }
@@ -1252,7 +1252,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
                                status |= TxDescIntr;
                                np->reap_tx = 0;
                        }
-                       if (skb->ip_summed == CHECKSUM_HW) {
+                       if (skb->ip_summed == CHECKSUM_PARTIAL) {
                                status |= TxCalTCP;
                                np->stats.tx_compressed++;
                        }
@@ -1307,7 +1307,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
 
 /* The interrupt handler does all of the Rx thread work and cleans up
    after the Tx thread. */
-static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
+static irqreturn_t intr_handler(int irq, void *dev_instance)
 {
        struct net_device *dev = dev_instance;
        struct netdev_private *np = netdev_priv(dev);
@@ -1452,7 +1452,6 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                   to a minimally-sized skbuff. */
                if (pkt_len < rx_copybreak
                    && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
-                       skb->dev = dev;
                        skb_reserve(skb, 2);    /* 16 byte align the IP header */
                        pci_dma_sync_single_for_cpu(np->pci_dev,
                                                    np->rx_info[entry].mapping,
@@ -1499,7 +1498,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
                 * Until then, the printk stays. :-) -Ion
                 */
                else if (le16_to_cpu(desc->status2) & 0x0040) {
-                       skb->ip_summed = CHECKSUM_HW;
+                       skb->ip_summed = CHECKSUM_COMPLETE;
                        skb->csum = le16_to_cpu(desc->csum);
                        printk(KERN_DEBUG "%s: checksum_hw, status2 = %#x\n", dev->name, le16_to_cpu(desc->status2));
                }
@@ -1737,7 +1736,7 @@ static void set_rx_mode(struct net_device *dev)
                int vlan_count = 0;
                void __iomem *filter_addr = ioaddr + HashTable + 8;
                for (i = 0; i < VLAN_VID_MASK; i++) {
-                       if (np->vlgrp->vlan_devices[i]) {
+                       if (vlan_group_get_device(np->vlgrp, i)) {
                                if (vlan_count >= 32)
                                        break;
                                writew(cpu_to_be16(i), filter_addr);