]> err.no Git - linux-2.6/commitdiff
netxen: fix dma watchdog
authorDhananjay Phadke <dhananjay@netxen.com>
Fri, 8 Aug 2008 07:08:42 +0000 (00:08 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 14 Aug 2008 08:43:14 +0000 (04:43 -0400)
NX3031 does not require driver to kill dma watchdog.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/netxen/netxen_nic_init.c

index 519fc860e17e0ac9e1aa018acc40549a60eca178..5bba675d0504594fc340ab3223956d167d4ef0ea 100644 (file)
@@ -1079,10 +1079,12 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter)
 
 void netxen_free_adapter_offload(struct netxen_adapter *adapter)
 {
-       int i;
+       int i = 100;
+
+       if (!adapter->dummy_dma.addr)
+               return;
 
-       if (adapter->dummy_dma.addr) {
-               i = 100;
+       if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
                do {
                        if (dma_watchdog_shutdown_request(adapter) == 1)
                                break;
@@ -1090,17 +1092,17 @@ void netxen_free_adapter_offload(struct netxen_adapter *adapter)
                        if (dma_watchdog_shutdown_poll_result(adapter) == 1)
                                break;
                } while (--i);
+       }
 
-               if (i) {
-                       pci_free_consistent(adapter->pdev,
-                                   NETXEN_HOST_DUMMY_DMA_SIZE,
-                                   adapter->dummy_dma.addr,
-                                   adapter->dummy_dma.phys_addr);
-                       adapter->dummy_dma.addr = NULL;
-               } else {
-                       printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
-                                       adapter->netdev->name);
-               }
+       if (i) {
+               pci_free_consistent(adapter->pdev,
+                           NETXEN_HOST_DUMMY_DMA_SIZE,
+                           adapter->dummy_dma.addr,
+                           adapter->dummy_dma.phys_addr);
+               adapter->dummy_dma.addr = NULL;
+       } else {
+               printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
+                               adapter->netdev->name);
        }
 }