ixgb: Fix early TSO completion
[pandora-kernel.git] / drivers / net / typhoon.c
index 1084180..9781b16 100644 (file)
@@ -86,7 +86,7 @@ static const int multicast_filter_limit = 32;
 #define RESPONSE_RING_SIZE     (RESPONSE_ENTRIES * sizeof(struct resp_desc))
 
 /* The 3XP will preload and remove 64 entries from the free buffer
- * list, and we need one entry to keep the ring from wrapping, so 
+ * list, and we need one entry to keep the ring from wrapping, so
  * to keep this a power of two, we use 128 entries.
  */
 #define RXFREE_ENTRIES         128
@@ -117,6 +117,7 @@ static const int multicast_filter_limit = 32;
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
+#include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/ethtool.h>
@@ -127,7 +128,6 @@ static const int multicast_filter_limit = 32;
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/in6.h>
-#include <asm/checksum.h>
 #include <linux/version.h>
 #include <linux/dma-mapping.h>
 
@@ -269,7 +269,7 @@ struct rxbuff_ent {
 
 struct typhoon {
        /* Tx cache line section */
-       struct transmit_ring    txLoRing        ____cacheline_aligned;  
+       struct transmit_ring    txLoRing        ____cacheline_aligned;
        struct pci_dev *        tx_pdev;
        void __iomem            *tx_ioaddr;
        u32                     txlo_dma_addr;
@@ -333,11 +333,7 @@ enum state_values {
 #define TYPHOON_RESET_TIMEOUT_NOSLEEP  ((6 * 1000000) / TYPHOON_UDELAY)
 #define TYPHOON_WAIT_TIMEOUT           ((1000000 / 2) / TYPHOON_UDELAY)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)
-#define typhoon_synchronize_irq(x) synchronize_irq()
-#else
 #define typhoon_synchronize_irq(x) synchronize_irq(x)
-#endif
 
 #if defined(NETIF_F_TSO)
 #define skb_tso_size(x)                (skb_shinfo(x)->gso_size)
@@ -830,7 +826,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
        first_txd->addrHi = (u64)((unsigned long) skb) >> 32;
        first_txd->processFlags = 0;
 
-       if(skb->ip_summed == CHECKSUM_HW) {
+       if(skb->ip_summed == CHECKSUM_PARTIAL) {
                /* The 3XP will figure out if this is UDP/TCP */
                first_txd->processFlags |= TYPHOON_TX_PF_TCP_CHKSUM;
                first_txd->processFlags |= TYPHOON_TX_PF_UDP_CHKSUM;
@@ -1071,7 +1067,7 @@ typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
                } else {
                        u32 sleep_ver = xp_resp[0].parm2;
                        snprintf(info->fw_version, 32, "%02x.%03x.%03x",
-                                sleep_ver >> 24, (sleep_ver >> 12) & 0xfff, 
+                                sleep_ver >> 24, (sleep_ver >> 12) & 0xfff,
                                 sleep_ver & 0xfff);
                }
        }
@@ -1241,7 +1237,7 @@ typhoon_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
        ering->tx_pending = TXLO_ENTRIES - 1;
 }
 
-static struct ethtool_ops typhoon_ethtool_ops = {
+static const struct ethtool_ops typhoon_ethtool_ops = {
        .get_settings           = typhoon_get_settings,
        .set_settings           = typhoon_set_settings,
        .get_drvinfo            = typhoon_get_drvinfo,
@@ -1830,7 +1826,7 @@ typhoon_poll(struct net_device *dev, int *total_budget)
 }
 
 static irqreturn_t
-typhoon_interrupt(int irq, void *dev_instance, struct pt_regs *rgs)
+typhoon_interrupt(int irq, void *dev_instance)
 {
        struct net_device *dev = (struct net_device *) dev_instance;
        struct typhoon *tp = dev->priv;
@@ -2152,7 +2148,7 @@ out_sleep:
                goto out;
        }
 
-       if(typhoon_sleep(tp, PCI_D3hot, 0) < 0) 
+       if(typhoon_sleep(tp, PCI_D3hot, 0) < 0)
                printk(KERN_ERR "%s: unable to go back to sleep\n", dev->name);
 
 out:
@@ -2600,7 +2596,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                        "(%u:%04x)\n", dev->name, xp_resp[0].numDesc,
                        le32_to_cpu(xp_resp[0].parm2));
        }
-               
+
        return 0;
 
 error_out_reset: