diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-10-26 18:51:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-28 14:47:53 -0400 |
commit | 683b65f89a7c26d9a9180d25066815ef5a31bd71 (patch) | |
tree | e26a2d8c8ebb1b987bc5892a88caca3f7b91a1d9 /drivers/net | |
parent | 448d7b5daf043d109df98e3e8f8deb165c2e8896 (diff) |
netxen: fix kdump
Reset the whole hw instead of freeing hw resources
consumed by each pci function.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@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 | 15 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 7 |
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c index 12612127a087..f7d06cbc70ae 100644 --- a/drivers/net/netxen/netxen_nic_ctx.c +++ b/drivers/net/netxen/netxen_nic_ctx.c | |||
@@ -255,19 +255,6 @@ 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 | ||
271 | nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter) | 258 | nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter) |
272 | { | 259 | { |
273 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; | 260 | struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; |
@@ -698,8 +685,6 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
698 | if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { | 685 | if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
699 | if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state)) | 686 | if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state)) |
700 | goto done; | 687 | goto done; |
701 | if (reset_devices) | ||
702 | nx_fw_cmd_reset_ctx(adapter); | ||
703 | err = nx_fw_cmd_create_rx_ctx(adapter); | 688 | err = nx_fw_cmd_create_rx_ctx(adapter); |
704 | if (err) | 689 | if (err) |
705 | goto err_out_free; | 690 | goto err_out_free; |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 50820beac3aa..35ae1aa12896 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -1356,6 +1356,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1356 | break; | 1356 | break; |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | if (reset_devices) { | ||
1360 | if (adapter->portnum == 0) { | ||
1361 | NXWR32(adapter, NX_CRB_DEV_REF_COUNT, 0); | ||
1362 | adapter->need_fw_reset = 1; | ||
1363 | } | ||
1364 | } | ||
1365 | |||
1359 | err = netxen_start_firmware(adapter); | 1366 | err = netxen_start_firmware(adapter); |
1360 | if (err) | 1367 | if (err) |
1361 | goto err_out_decr_ref; | 1368 | goto err_out_decr_ref; |