diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index f6aeccfa2831..70d1b22ced22 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -840,10 +840,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | |||
840 | netxen_nic_pci_change_crbwindow(adapter, 1); | 840 | netxen_nic_pci_change_crbwindow(adapter, 1); |
841 | } | 841 | } |
842 | if (init_delay == 1) { | 842 | if (init_delay == 1) { |
843 | msleep(2000); | 843 | msleep(1000); |
844 | init_delay = 0; | 844 | init_delay = 0; |
845 | } | 845 | } |
846 | msleep(20); | 846 | msleep(1); |
847 | } | 847 | } |
848 | kfree(buf); | 848 | kfree(buf); |
849 | 849 | ||
@@ -918,12 +918,28 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter) | |||
918 | 918 | ||
919 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) | 919 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) |
920 | { | 920 | { |
921 | int i; | ||
922 | |||
921 | if (adapter->dummy_dma.addr) { | 923 | if (adapter->dummy_dma.addr) { |
922 | pci_free_consistent(adapter->ahw.pdev, | 924 | i = 100; |
925 | do { | ||
926 | if (dma_watchdog_shutdown_request(adapter) == 1) | ||
927 | break; | ||
928 | msleep(50); | ||
929 | if (dma_watchdog_shutdown_poll_result(adapter) == 1) | ||
930 | break; | ||
931 | } while (--i); | ||
932 | |||
933 | if (i) { | ||
934 | pci_free_consistent(adapter->ahw.pdev, | ||
923 | NETXEN_HOST_DUMMY_DMA_SIZE, | 935 | NETXEN_HOST_DUMMY_DMA_SIZE, |
924 | adapter->dummy_dma.addr, | 936 | adapter->dummy_dma.addr, |
925 | adapter->dummy_dma.phys_addr); | 937 | adapter->dummy_dma.phys_addr); |
926 | adapter->dummy_dma.addr = NULL; | 938 | adapter->dummy_dma.addr = NULL; |
939 | } else { | ||
940 | printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n", | ||
941 | adapter->netdev->name); | ||
942 | } | ||
927 | } | 943 | } |
928 | } | 944 | } |
929 | 945 | ||