diff options
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 519fc860e17e..5bba675d0504 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) | |||
1079 | 1079 | ||
1080 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) | 1080 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) |
1081 | { | 1081 | { |
1082 | int i; | 1082 | int i = 100; |
1083 | |||
1084 | if (!adapter->dummy_dma.addr) | ||
1085 | return; | ||
1083 | 1086 | ||
1084 | if (adapter->dummy_dma.addr) { | 1087 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
1085 | i = 100; | ||
1086 | do { | 1088 | do { |
1087 | if (dma_watchdog_shutdown_request(adapter) == 1) | 1089 | if (dma_watchdog_shutdown_request(adapter) == 1) |
1088 | break; | 1090 | break; |
@@ -1090,17 +1092,17 @@ void netxen_free_adapter_offload(struct netxen_adapter *adapter) | |||
1090 | if (dma_watchdog_shutdown_poll_result(adapter) == 1) | 1092 | if (dma_watchdog_shutdown_poll_result(adapter) == 1) |
1091 | break; | 1093 | break; |
1092 | } while (--i); | 1094 | } while (--i); |
1095 | } | ||
1093 | 1096 | ||
1094 | if (i) { | 1097 | if (i) { |
1095 | pci_free_consistent(adapter->pdev, | 1098 | pci_free_consistent(adapter->pdev, |
1096 | NETXEN_HOST_DUMMY_DMA_SIZE, | 1099 | NETXEN_HOST_DUMMY_DMA_SIZE, |
1097 | adapter->dummy_dma.addr, | 1100 | adapter->dummy_dma.addr, |
1098 | adapter->dummy_dma.phys_addr); | 1101 | adapter->dummy_dma.phys_addr); |
1099 | adapter->dummy_dma.addr = NULL; | 1102 | adapter->dummy_dma.addr = NULL; |
1100 | } else { | 1103 | } else { |
1101 | printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n", | 1104 | printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n", |
1102 | adapter->netdev->name); | 1105 | adapter->netdev->name); |
1103 | } | ||
1104 | } | 1106 | } |
1105 | } | 1107 | } |
1106 | 1108 | ||