Skip to content

Commit

Permalink
ionic: leave dev cmd request contents alone on FW timeout
Browse files Browse the repository at this point in the history
It is possible (but unlikely) that FW was busy and missed a heartbeat
check but is still alive and will process the pending request, so don't
clean the dev_cmd in this case.  This occasionally occurs when working
with a card that is supporting many devices and is trying to shut them
all down at once, but still wants to see that last LIF disable request.

Fixes: 97ca486 ("ionic: add heartbeat check")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shannon Nelson authored and David S. Miller committed Mar 22, 2020
1 parent 4ee7bda commit 2530ba5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds)
done, duration / HZ, duration);

if (!done && hb) {
ionic_dev_cmd_clean(ionic);
/* It is possible (but unlikely) that FW was busy and missed a
* heartbeat check but is still alive and will process this
* request, so don't clean the dev_cmd in this case.
*/
dev_warn(ionic->dev, "DEVCMD %s (%d) failed - FW halted\n",
ionic_opcode_to_str(opcode), opcode);
return -ENXIO;
Expand Down

0 comments on commit 2530ba5

Please sign in to comment.