]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/tg3.c
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / drivers / net / tg3.c
index b547233ad9f726816f31e3d42b19b5477f8d9766..47bd4a39442099bfa5640b79781b4438afeb7563 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/tcp.h>
 #include <linux/workqueue.h>
 #include <linux/prefetch.h>
+#include <linux/dma-mapping.h>
 
 #include <net/checksum.h>
 
@@ -67,8 +68,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "3.43"
-#define DRV_MODULE_RELDATE     "Oct 24, 2005"
+#define DRV_MODULE_VERSION     "3.44"
+#define DRV_MODULE_RELDATE     "Dec 6, 2005"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -3564,12 +3565,15 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (!spin_trylock(&tp->tx_lock))
                return NETDEV_TX_LOCKED; 
 
-       /* This is a hard error, log it. */
        if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {
-               netif_stop_queue(dev);
+               if (!netif_queue_stopped(dev)) {
+                       netif_stop_queue(dev);
+
+                       /* This is a hard error, log it. */
+                       printk(KERN_ERR PFX "%s: BUG! Tx Ring full when "
+                              "queue awake!\n", dev->name);
+               }
                spin_unlock(&tp->tx_lock);
-               printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
-                      dev->name);
                return NETDEV_TX_BUSY;
        }
 
@@ -10522,17 +10526,17 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        }
 
        /* Configure DMA attributes. */
-       err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+       err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
        if (!err) {
                pci_using_dac = 1;
-               err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+               err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
                if (err < 0) {
                        printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
                               "for consistent allocations\n");
                        goto err_out_free_res;
                }
        } else {
-               err = pci_set_dma_mask(pdev, 0xffffffffULL);
+               err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
                if (err) {
                        printk(KERN_ERR PFX "No usable DMA configuration, "
                               "aborting.\n");