Commit 68b3cae0 authored by Dhananjay Phadke's avatar Dhananjay Phadke Committed by David S. Miller

netxen: refresh firmware info after reset

o move dma mask update to netxen_start_firmware() so that
  if firmware changes across suspend (e.g. file -> flash)
  it reflects right dma mask.
o re-read firmware capabilities after firmware reset.
Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 663a31ce
......@@ -2047,6 +2047,9 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter)
dev_info(&pdev->dev, "firmware running in %s mode\n",
adapter->ahw.cut_through ? "cut-through" : "legacy");
}
if (adapter->fw_version >= NETXEN_VERSION_CODE(4, 0, 222))
adapter->capabilities = NXRD32(adapter, CRB_FW_CAPABILITIES_1);
}
int
......
......@@ -1083,10 +1083,6 @@ int netxen_init_firmware(struct netxen_adapter *adapter)
NXWR32(adapter, CRB_MPORT_MODE, MPORT_MULTI_FUNCTION_MODE);
NXWR32(adapter, CRB_CMDPEG_STATE, PHAN_INITIALIZE_ACK);
if (adapter->fw_version >= NETXEN_VERSION_CODE(4, 0, 222)) {
adapter->capabilities = NXRD32(adapter, CRB_FW_CAPABILITIES_1);
}
return err;
}
......
......@@ -764,6 +764,10 @@ netxen_start_firmware(struct netxen_adapter *adapter, int request_fw)
return err;
}
nx_update_dma_mask(adapter);
netxen_nic_get_firmware_info(adapter);
return 0;
}
......@@ -1071,11 +1075,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = netxen_start_firmware(adapter, 1);
if (err)
goto err_out_iounmap;
nx_update_dma_mask(adapter);
netxen_nic_get_firmware_info(adapter);
/*
* See if the firmware gave us a virtual-physical port mapping.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment