Commit 4cc787bd authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller
Browse files

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: 8c9d956a ("ionic: allow adminq requests to override default error message")
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent abd75d14
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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,