]> git.baikalelectronics.ru Git - kernel.git/commit
ionic: Correctly print AQ errors if completions aren't received
authorBrett Creeley <brett@pensando.io>
Mon, 24 Jan 2022 18:53:04 +0000 (10:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jan 2022 11:15:09 +0000 (11:15 +0000)
commitc734dfff776588e5794c3b1934d2201d5791d9ab
tree1d92a20f8c90fc30d6af983fbdbbe3ee886a1c9f
parent3e8b1dc71823a560cb43b7347406097a14934152
ionic: Correctly print AQ errors if completions aren't received

Recent changes went into the driver to allow flexibility when
printing error messages. Unfortunately this had the unexpected
consequence of printing confusing messages like the following:

IONIC_CMD_RX_FILTER_ADD (31) failed: IONIC_RC_SUCCESS (-6)

In cases like this the completion of the admin queue command never
completes, so the completion status is 0, hence IONIC_RC_SUCCESS
is printed even though the command clearly failed. For example,
this could happen when the driver tries to add a filter and at
the same time the FW goes through a reset, so the AQ command
never completes.

Fix this by forcing the FW completion status to IONIC_RC_ERROR
in cases where we never get the completion.

Fixes: c4a13302bd79 ("ionic: allow adminq requests to override default error message")
Signed-off-by: Brett Creeley <brett@pensando.io>
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_main.c