aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/netxen/netxen_nic_ctx.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-07-23 18:43:48 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-07-23 18:43:48 +0900
commita3beddd0aa267986de7b13b6d9cd0e1869fcf1fc (patch)
treebfdc42183f5aac21f605a30a4a511298ab91e3c5 /drivers/net/netxen/netxen_nic_ctx.c
parent955c9863bb5855a994751843e7066017edc00410 (diff)
parent5bdef865eb358b6f3760e25e591ae115e9eeddef (diff)
Merge branch 'sh/kfr2r09'
Diffstat (limited to 'drivers/net/netxen/netxen_nic_ctx.c')
-rw-r--r--drivers/net/netxen/netxen_nic_ctx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c
index 4754f5cffad..9f8ae4719e2 100644
--- a/drivers/net/netxen/netxen_nic_ctx.c
+++ b/drivers/net/netxen/netxen_nic_ctx.c
@@ -684,10 +684,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
goto err_out_free;
} else {
err = netxen_init_old_ctx(adapter);
- if (err) {
- netxen_free_hw_resources(adapter);
- return err;
- }
+ if (err)
+ goto err_out_free;
}
return 0;
@@ -708,15 +706,18 @@ void netxen_free_hw_resources(struct netxen_adapter *adapter)
int port = adapter->portnum;
if (adapter->fw_major >= 4) {
- nx_fw_cmd_destroy_tx_ctx(adapter);
nx_fw_cmd_destroy_rx_ctx(adapter);
+ nx_fw_cmd_destroy_tx_ctx(adapter);
} else {
netxen_api_lock(adapter);
NXWR32(adapter, CRB_CTX_SIGNATURE_REG(port),
- NETXEN_CTX_RESET | port);
+ NETXEN_CTX_D3_RESET | port);
netxen_api_unlock(adapter);
}
+ /* Allow dma queues to drain after context reset */
+ msleep(20);
+
recv_ctx = &adapter->recv_ctx;
if (recv_ctx->hwctx != NULL) {