diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2008-08-08 00:08:42 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-08-14 04:43:14 -0400 |
commit | 15eef1e1b718667981da92d2fa18283f181c117c (patch) | |
tree | 1466795fd7a1f4ab10a7c4e1146bf3567e4392b1 /drivers/net/netxen/netxen_nic_init.c | |
parent | 922c4f2c70c156ac38b4e6affbd30d4b1efd5864 (diff) | |
download | kernel_samsung_crespo-15eef1e1b718667981da92d2fa18283f181c117c.zip kernel_samsung_crespo-15eef1e1b718667981da92d2fa18283f181c117c.tar.gz kernel_samsung_crespo-15eef1e1b718667981da92d2fa18283f181c117c.tar.bz2 |
netxen: fix dma watchdog
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>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 519fc86..5bba675 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c @@ -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); } } |