macvlan: add GRO bit to features mask
[safe/jmp/linux-2.6] / drivers / net / sungem.c
index 1927b3d..b55ceb8 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
+#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/delay.h>
@@ -106,7 +107,7 @@ MODULE_LICENSE("GPL");
 #define GEM_MODULE_NAME        "gem"
 #define PFX GEM_MODULE_NAME ": "
 
-static struct pci_device_id gem_pci_tbl[] = {
+static DEFINE_PCI_DEVICE_TABLE(gem_pci_tbl) = {
        { PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_GEM,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 
@@ -1033,10 +1034,8 @@ static netdev_tx_t gem_start_xmit(struct sk_buff *skb,
                        (csum_stuff_off << 21));
        }
 
-       local_irq_save(flags);
-       if (!spin_trylock(&gp->tx_lock)) {
+       if (!spin_trylock_irqsave(&gp->tx_lock, flags)) {
                /* Tell upper layer to requeue */
-               local_irq_restore(flags);
                return NETDEV_TX_LOCKED;
        }
        /* We raced with gem_do_stop() */