aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/benet/be_cmds.c24
-rw-r--r--drivers/net/benet/be_cmds.h17
2 files changed, 23 insertions, 18 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 30719f591fb2..d09351c56a1f 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -106,14 +106,24 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
106 netdev_stats_update(adapter); 106 netdev_stats_update(adapter);
107 adapter->stats_cmd_sent = false; 107 adapter->stats_cmd_sent = false;
108 } 108 }
109 } else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) && 109 } else {
110 (compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) { 110 if (compl_status == MCC_STATUS_NOT_SUPPORTED ||
111 extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & 111 compl_status == MCC_STATUS_ILLEGAL_REQUEST)
112 CQE_STATUS_EXTD_MASK; 112 goto done;
113 dev_warn(&adapter->pdev->dev, 113
114 "Error in cmd completion - opcode %d, compl %d, extd %d\n", 114 if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) {
115 compl->tag0, compl_status, extd_status); 115 dev_warn(&adapter->pdev->dev, "This domain(VM) is not "
116 "permitted to execute this cmd (opcode %d)\n",
117 compl->tag0);
118 } else {
119 extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
120 CQE_STATUS_EXTD_MASK;
121 dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:"
122 "status %d, extd-status %d\n",
123 compl->tag0, compl_status, extd_status);
124 }
116 } 125 }
126done:
117 return compl_status; 127 return compl_status;
118} 128}
119 129
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index d08289e21f61..f0d745742d9d 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -51,17 +51,12 @@ struct be_mcc_wrb {
51 51
52/* Completion Status */ 52/* Completion Status */
53enum { 53enum {
54 MCC_STATUS_SUCCESS = 0x0, 54 MCC_STATUS_SUCCESS = 0,
55/* The client does not have sufficient privileges to execute the command */ 55 MCC_STATUS_FAILED = 1,
56 MCC_STATUS_INSUFFICIENT_PRIVILEGES = 0x1, 56 MCC_STATUS_ILLEGAL_REQUEST = 2,
57/* A parameter in the command was invalid. */ 57 MCC_STATUS_ILLEGAL_FIELD = 3,
58 MCC_STATUS_INVALID_PARAMETER = 0x2, 58 MCC_STATUS_INSUFFICIENT_BUFFER = 4,
59/* There are insufficient chip resources to execute the command */ 59 MCC_STATUS_UNAUTHORIZED_REQUEST = 5,
60 MCC_STATUS_INSUFFICIENT_RESOURCES = 0x3,
61/* The command is completing because the queue was getting flushed */
62 MCC_STATUS_QUEUE_FLUSHING = 0x4,
63/* The command is completing with a DMA error */
64 MCC_STATUS_DMA_FAILED = 0x5,
65 MCC_STATUS_NOT_SUPPORTED = 66 60 MCC_STATUS_NOT_SUPPORTED = 66
66}; 61};
67 62