mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
be2net: Fix Lancer error recovery to distinguish FW download
The Firmware update would be detected by looking at the sliport_error1/ sliport_error2 register values(0x02/0x00). If its not a FW reset the current messaging would take place. If the error is due to FW reset, log a message to user that "Firmware update in progress" and also do not log sliport_status and sliport_error register values. Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d0b7da8afa
commit
4bebb56a6d
2 changed files with 17 additions and 4 deletions
|
@ -64,6 +64,9 @@
|
||||||
#define SLIPORT_ERROR_NO_RESOURCE1 0x2
|
#define SLIPORT_ERROR_NO_RESOURCE1 0x2
|
||||||
#define SLIPORT_ERROR_NO_RESOURCE2 0x9
|
#define SLIPORT_ERROR_NO_RESOURCE2 0x9
|
||||||
|
|
||||||
|
#define SLIPORT_ERROR_FW_RESET1 0x2
|
||||||
|
#define SLIPORT_ERROR_FW_RESET2 0x0
|
||||||
|
|
||||||
/********* Memory BAR register ************/
|
/********* Memory BAR register ************/
|
||||||
#define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc
|
#define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc
|
||||||
/* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt
|
/* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt
|
||||||
|
|
|
@ -2464,9 +2464,17 @@ void be_detect_error(struct be_adapter *adapter)
|
||||||
*/
|
*/
|
||||||
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
|
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
|
||||||
adapter->hw_error = true;
|
adapter->hw_error = true;
|
||||||
|
/* Do not log error messages if its a FW reset */
|
||||||
|
if (sliport_err1 == SLIPORT_ERROR_FW_RESET1 &&
|
||||||
|
sliport_err2 == SLIPORT_ERROR_FW_RESET2) {
|
||||||
|
dev_info(&adapter->pdev->dev,
|
||||||
|
"Firmware update in progress\n");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
dev_err(&adapter->pdev->dev,
|
dev_err(&adapter->pdev->dev,
|
||||||
"Error detected in the card\n");
|
"Error detected in the card\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
|
if (sliport_status & SLIPORT_STATUS_ERR_MASK) {
|
||||||
dev_err(&adapter->pdev->dev,
|
dev_err(&adapter->pdev->dev,
|
||||||
|
@ -3812,6 +3820,8 @@ static int lancer_fw_download(struct be_adapter *adapter,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change_status == LANCER_FW_RESET_NEEDED) {
|
if (change_status == LANCER_FW_RESET_NEEDED) {
|
||||||
|
dev_info(&adapter->pdev->dev,
|
||||||
|
"Resetting adapter to activate new FW\n");
|
||||||
status = lancer_physdev_ctrl(adapter,
|
status = lancer_physdev_ctrl(adapter,
|
||||||
PHYSDEV_CONTROL_FW_RESET_MASK);
|
PHYSDEV_CONTROL_FW_RESET_MASK);
|
||||||
if (status) {
|
if (status) {
|
||||||
|
@ -4363,13 +4373,13 @@ static int lancer_recover_func(struct be_adapter *adapter)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_err(dev, "Error recovery successful\n");
|
dev_err(dev, "Adapter recovery successful\n");
|
||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
if (status == -EAGAIN)
|
if (status == -EAGAIN)
|
||||||
dev_err(dev, "Waiting for resource provisioning\n");
|
dev_err(dev, "Waiting for resource provisioning\n");
|
||||||
else
|
else
|
||||||
dev_err(dev, "Error recovery failed\n");
|
dev_err(dev, "Adapter recovery failed\n");
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue