summaryrefslogtreecommitdiff
path: root/drivers/net/netxen/netxen_nic_init.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-25 12:29:32 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-25 12:29:32 +0200
commit1262b0088f3c1928c0487d4074c6cda11a8b78c6 (patch)
tree688de0df6f0bca72a40014023e9d3c42e9bea6f4 /drivers/net/netxen/netxen_nic_init.c
parent378fc6eedc0091cc5ba65b298b8967bd2d43df5d (diff)
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
Merge branch 'linus' into x86/cleanupstip-x86-cleanups-2008-06-25_10.29_Wed
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c46
1 files changed, 21 insertions, 25 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 45fa33e0cb90..70d1b22ced22 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -203,21 +203,6 @@ void netxen_initialize_adapter_sw(struct netxen_adapter *adapter)
}
}
-void netxen_initialize_adapter_hw(struct netxen_adapter *adapter)
-{
- int ports = 0;
- struct netxen_board_info *board_info = &(adapter->ahw.boardcfg);
-
- if (netxen_nic_get_board_info(adapter) != 0)
- printk("%s: Error getting board config info.\n",
- netxen_nic_driver_name);
- get_brd_port_by_type(board_info->board_type, &ports);
- if (ports == 0)
- printk(KERN_ERR "%s: Unknown board type\n",
- netxen_nic_driver_name);
- adapter->ahw.max_ports = ports;
-}
-
void netxen_initialize_adapter_ops(struct netxen_adapter *adapter)
{
switch (adapter->ahw.board_type) {
@@ -765,18 +750,13 @@ int netxen_flash_unlock(struct netxen_adapter *adapter)
int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
{
- int addr, val, status;
+ int addr, val;
int n, i;
int init_delay = 0;
struct crb_addr_pair *buf;
u32 off;
/* resetall */
- status = netxen_nic_get_board_info(adapter);
- if (status)
- printk("%s: netxen_pinit_from_rom: Error getting board info\n",
- netxen_nic_driver_name);
-
netxen_crb_writelit_adapter(adapter, NETXEN_ROMUSB_GLB_SW_RESET,
NETXEN_ROMBUS_RESET);
@@ -860,10 +840,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose)
netxen_nic_pci_change_crbwindow(adapter, 1);
}
if (init_delay == 1) {
- msleep(2000);
+ msleep(1000);
init_delay = 0;
}
- msleep(20);
+ msleep(1);
}
kfree(buf);
@@ -938,12 +918,28 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter)
void netxen_free_adapter_offload(struct netxen_adapter *adapter)
{
+ int i;
+
if (adapter->dummy_dma.addr) {
- pci_free_consistent(adapter->ahw.pdev,
+ i = 100;
+ do {
+ if (dma_watchdog_shutdown_request(adapter) == 1)
+ break;
+ msleep(50);
+ if (dma_watchdog_shutdown_poll_result(adapter) == 1)
+ break;
+ } while (--i);
+
+ if (i) {
+ pci_free_consistent(adapter->ahw.pdev,
NETXEN_HOST_DUMMY_DMA_SIZE,
adapter->dummy_dma.addr,
adapter->dummy_dma.phys_addr);
- adapter->dummy_dma.addr = NULL;
+ adapter->dummy_dma.addr = NULL;
+ } else {
+ printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
+ adapter->netdev->name);
+ }
}
}