]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/amd8111e.c
cfq-iosched: get rid of enable_idle being unused warning
[linux-2.6-omap-h63xx.git] / drivers / net / amd8111e.c
index babe0de2ce44e5cf11ee1dee1c8940f8e83e0fc2..85f7276aaba592b4490c3f5c526b938e8cd0045a 100644 (file)
@@ -709,7 +709,8 @@ static int amd8111e_tx(struct net_device *dev)
                lp->tx_complete_idx++;
                /*COAL update tx coalescing parameters */
                lp->coal_conf.tx_packets++;
-               lp->coal_conf.tx_bytes += lp->tx_ring[tx_index].buff_count;
+               lp->coal_conf.tx_bytes +=
+                       le16_to_cpu(lp->tx_ring[tx_index].buff_count);
 
                if (netif_queue_stopped(dev) &&
                        lp->tx_complete_idx > lp->tx_idx - NUM_TX_BUFFERS +2){
@@ -1110,7 +1111,7 @@ static struct net_device_stats *amd8111e_get_stats(struct net_device * dev)
 
        return new_stats;
 }
-/* This function recalculate the interupt coalescing  mode on every interrupt
+/* This function recalculate the interrupt coalescing  mode on every interrupt
 according to the datarate and the packet rate.
 */
 static int amd8111e_calc_coalesce(struct net_device *dev)
@@ -1339,7 +1340,9 @@ static int amd8111e_close(struct net_device * dev)
        struct amd8111e_priv *lp = netdev_priv(dev);
        netif_stop_queue(dev);
 
+#ifdef CONFIG_AMD8111E_NAPI
        napi_disable(&lp->napi);
+#endif
 
        spin_lock_irq(&lp->lock);
 
@@ -1371,7 +1374,9 @@ static int amd8111e_open(struct net_device * dev )
                                         dev->name, dev))
                return -EAGAIN;
 
+#ifdef CONFIG_AMD8111E_NAPI
        napi_enable(&lp->napi);
+#endif
 
        spin_lock_irq(&lp->lock);
 
@@ -1379,7 +1384,9 @@ static int amd8111e_open(struct net_device * dev )
 
        if(amd8111e_restart(dev)){
                spin_unlock_irq(&lp->lock);
+#ifdef CONFIG_AMD8111E_NAPI
                napi_disable(&lp->napi);
+#endif
                if (dev->irq)
                        free_irq(dev->irq, dev);
                return -ENOMEM;
@@ -1938,13 +1945,13 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
 
        err = pci_enable_device(pdev);
        if(err){
-               printk(KERN_ERR "amd8111e: Cannot enable new PCI device,"
+               printk(KERN_ERR "amd8111e: Cannot enable new PCI device, "
                        "exiting.\n");
                return err;
        }
 
        if(!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)){
-               printk(KERN_ERR "amd8111e: Cannot find PCI base address"
+               printk(KERN_ERR "amd8111e: Cannot find PCI base address"
                       "exiting.\n");
                err = -ENODEV;
                goto err_disable_pdev;