diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-07-14 20:55:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-14 20:55:35 -0400 |
commit | f8320f059296eb8cab6e2429c7ec79b43d42cf42 (patch) | |
tree | a6d9c7b48e6d680e3b6e604c50ace023870cd554 /drivers/net | |
parent | bdb0f8672ff6f601a32df5af40f11526b741985c (diff) |
netxen: fix for kdump
When the crash kernel is loaded after crash, the device is in unknown state.
So reset the device contexts prior to its creation in case of kdump,
depending upon kernel parameter reset_devices.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ctx.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c index 3a41b6a84a68..12612127a087 100644 --- a/drivers/net/netxen/netxen_nic_ctx.c +++ b/drivers/net/netxen/netxen_nic_ctx.c | |||
@@ -255,6 +255,19 @@ out_free_rq: | |||
255 | } | 255 | } |
256 | 256 | ||
257 | static void | 257 | static void |
258 | nx_fw_cmd_reset_ctx(struct netxen_adapter *adapter) | ||
259 | { | ||
260 | |||
261 | netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, | ||
262 | adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0, | ||
263 | NX_CDRP_CMD_DESTROY_RX_CTX); | ||
264 | |||
265 | netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, | ||
266 | adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0, | ||
267 | NX_CDRP_CMD_DESTROY_TX_CTX); | ||
268 | } | ||
269 | |||
270 | static void | ||
258 | nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter) | 271 | nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter) |
259 | { | 272 | { |
260 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; | 273 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; |
@@ -685,7 +698,8 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
685 | if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { | 698 | if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
686 | if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state)) | 699 | if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state)) |
687 | goto done; | 700 | goto done; |
688 | 701 | if (reset_devices) | |
702 | nx_fw_cmd_reset_ctx(adapter); | ||
689 | err = nx_fw_cmd_create_rx_ctx(adapter); | 703 | err = nx_fw_cmd_create_rx_ctx(adapter); |
690 | if (err) | 704 | if (err) |
691 | goto err_out_free; | 705 | goto err_out_free; |