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>
This commit is contained in:
parent
448d7b5daf
commit
683b65f89a
|
@ -254,19 +254,6 @@ out_free_rq:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
nx_fw_cmd_reset_ctx(struct netxen_adapter *adapter)
|
|
||||||
{
|
|
||||||
|
|
||||||
netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION,
|
|
||||||
adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0,
|
|
||||||
NX_CDRP_CMD_DESTROY_RX_CTX);
|
|
||||||
|
|
||||||
netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION,
|
|
||||||
adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0,
|
|
||||||
NX_CDRP_CMD_DESTROY_TX_CTX);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter)
|
nx_fw_cmd_destroy_rx_ctx(struct netxen_adapter *adapter)
|
||||||
{
|
{
|
||||||
|
@ -698,8 +685,6 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter)
|
||||||
if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
|
if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
|
||||||
if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state))
|
if (test_and_set_bit(__NX_FW_ATTACHED, &adapter->state))
|
||||||
goto done;
|
goto done;
|
||||||
if (reset_devices)
|
|
||||||
nx_fw_cmd_reset_ctx(adapter);
|
|
||||||
err = nx_fw_cmd_create_rx_ctx(adapter);
|
err = nx_fw_cmd_create_rx_ctx(adapter);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_out_free;
|
goto err_out_free;
|
||||||
|
|
|
@ -1356,6 +1356,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (reset_devices) {
|
||||||
|
if (adapter->portnum == 0) {
|
||||||
|
NXWR32(adapter, NX_CRB_DEV_REF_COUNT, 0);
|
||||||
|
adapter->need_fw_reset = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err = netxen_start_firmware(adapter);
|
err = netxen_start_firmware(adapter);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_out_decr_ref;
|
goto err_out_decr_ref;
|
||||||
|
|
Loading…
Reference in New Issue