Skip to content

Commit 4cc787b

Browse files
emuslndavem330
authored andcommitted
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: 8c9d956 ("ionic: allow adminq requests to override default error message") Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent abd75d1 commit 4cc787b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/net/ethernet/pensando/ionic/ionic_main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,13 @@ static void ionic_adminq_flush(struct ionic_lif *lif)
215215
void ionic_adminq_netdev_err_print(struct ionic_lif *lif, u8 opcode,
216216
u8 status, int err)
217217
{
218+
const char *stat_str;
219+
220+
stat_str = (err == -ETIMEDOUT) ? "TIMEOUT" :
221+
ionic_error_to_str(status);
222+
218223
netdev_err(lif->netdev, "%s (%d) failed: %s (%d)\n",
219-
ionic_opcode_to_str(opcode), opcode,
220-
ionic_error_to_str(status), err);
224+
ionic_opcode_to_str(opcode), opcode, stat_str, err);
221225
}
222226

223227
static int ionic_adminq_check_err(struct ionic_lif *lif,

0 commit comments

Comments
 (0)