Skip to content

Commit bc43ed4

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ int ionic_adminq_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx,
322322
if (do_msg && !test_bit(IONIC_LIF_F_FW_RESET, lif->state))
323323
netdev_err(netdev, "Posting of %s (%d) failed: %d\n",
324324
name, ctx->cmd.cmd.opcode, err);
325+
ctx->comp.comp.status = IONIC_RC_ERROR;
325326
return err;
326327
}
327328

@@ -342,6 +343,7 @@ int ionic_adminq_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx,
342343
if (do_msg)
343344
netdev_err(netdev, "%s (%d) interrupted, FW in reset\n",
344345
name, ctx->cmd.cmd.opcode);
346+
ctx->comp.comp.status = IONIC_RC_ERROR;
345347
return -ENXIO;
346348
}
347349

0 commit comments

Comments
 (0)