diff options
author | Shannon Nelson <snelson@pensando.io> | 2021-10-09 11:45:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-10 10:42:47 +0100 |
commit | 8c9d956ab6fbd10413398eeb81f433b07c1c23d7 (patch) | |
tree | 1f472ebc47c330833bbb9628272aced122221bb6 /drivers/net/ethernet/pensando/ionic/ionic.h | |
parent | ionic: handle vlan id overflow (diff) | |
download | linux-8c9d956ab6fbd10413398eeb81f433b07c1c23d7.tar.xz linux-8c9d956ab6fbd10413398eeb81f433b07c1c23d7.zip |
ionic: allow adminq requests to override default error message
The AdminQ handler has an error handler that automatically prints
an error message when the request has failed. However, there are
situations where the caller can expect that it might fail and has
an alternative strategy, thus may not want the error message sent
to the log, such as hitting -ENOSPC when adding a new vlan id.
We add a new interface to the AdminQ API to allow for override of
the default behavior, and an interface to the use standard error
message formatting.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic.h')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h index d570d03b23f6..5e25411ff02f 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic.h +++ b/drivers/net/ethernet/pensando/ionic/ionic.h @@ -70,8 +70,13 @@ struct ionic_admin_ctx { }; int ionic_adminq_post(struct ionic_lif *lif, struct ionic_admin_ctx *ctx); -int ionic_adminq_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx, int err); +int ionic_adminq_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx, + const int err, const bool do_msg); int ionic_adminq_post_wait(struct ionic_lif *lif, struct ionic_admin_ctx *ctx); +int ionic_adminq_post_wait_nomsg(struct ionic_lif *lif, struct ionic_admin_ctx *ctx); +void ionic_adminq_netdev_err_print(struct ionic_lif *lif, u8 opcode, + u8 status, int err); + int ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_wait); int ionic_set_dma_mask(struct ionic *ionic); int ionic_setup(struct ionic *ionic); |