aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/pensando
diff options
context:
space:
mode:
authorShannon Nelson <snelson@pensando.io>2022-01-24 10:53:03 -0800
committerDavid S. Miller <davem@davemloft.net>2022-01-25 11:15:09 +0000
commit4cc787bd88be6974f3362fa49fd8c5609bd039b8 (patch)
treef0ffe18d4776dbae9b14c3a13538b600a2b31424 /drivers/net/ethernet/pensando
parentionic: better handling of RESET event (diff)
downloadlinux-dev-4cc787bd88be6974f3362fa49fd8c5609bd039b8.tar.xz
linux-dev-4cc787bd88be6974f3362fa49fd8c5609bd039b8.zip
ionic: fix up printing of timeout error
Make sure we print the TIMEOUT string if we had a timeout error, rather than printing the wrong status. Fixes: 8c9d956ab6fb ("ionic: allow adminq requests to override default error message") Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c
index 449e9ee2acf0..04fc2342b055 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_main.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c
@@ -215,9 +215,13 @@ static void ionic_adminq_flush(struct ionic_lif *lif)
void ionic_adminq_netdev_err_print(struct ionic_lif *lif, u8 opcode,
u8 status, int err)
{
+ const char *stat_str;
+
+ stat_str = (err == -ETIMEDOUT) ? "TIMEOUT" :
+ ionic_error_to_str(status);
+
netdev_err(lif->netdev, "%s (%d) failed: %s (%d)\n",
- ionic_opcode_to_str(opcode), opcode,
- ionic_error_to_str(status), err);
+ ionic_opcode_to_str(opcode), opcode, stat_str, err);
}
static int ionic_adminq_check_err(struct ionic_lif *lif,