mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
qlcnic: fix unsupported CDRP command error message.
Add debug messages for FW CDRP command failure. Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cae82d4999
commit
e42ede226c
2 changed files with 33 additions and 5 deletions
|
@ -612,7 +612,11 @@ struct qlcnic_recv_context {
|
|||
#define QLCNIC_CDRP_CMD_GET_MAC_STATS 0x00000037
|
||||
|
||||
#define QLCNIC_RCODE_SUCCESS 0
|
||||
#define QLCNIC_RCODE_INVALID_ARGS 6
|
||||
#define QLCNIC_RCODE_NOT_SUPPORTED 9
|
||||
#define QLCNIC_RCODE_NOT_PERMITTED 10
|
||||
#define QLCNIC_RCODE_NOT_IMPL 15
|
||||
#define QLCNIC_RCODE_INVALID 16
|
||||
#define QLCNIC_RCODE_TIMEOUT 17
|
||||
#define QLCNIC_DESTROY_CTX_RESET 0
|
||||
|
||||
|
|
|
@ -53,12 +53,39 @@ qlcnic_issue_cmd(struct qlcnic_adapter *adapter, struct qlcnic_cmd_args *cmd)
|
|||
rsp = qlcnic_poll_rsp(adapter);
|
||||
|
||||
if (rsp == QLCNIC_CDRP_RSP_TIMEOUT) {
|
||||
dev_err(&pdev->dev, "card response timeout.\n");
|
||||
dev_err(&pdev->dev, "CDRP response timeout.\n");
|
||||
cmd->rsp.cmd = QLCNIC_RCODE_TIMEOUT;
|
||||
} else if (rsp == QLCNIC_CDRP_RSP_FAIL) {
|
||||
cmd->rsp.cmd = QLCRD32(adapter, QLCNIC_ARG1_CRB_OFFSET);
|
||||
dev_err(&pdev->dev, "failed card response code:0x%x\n",
|
||||
switch (cmd->rsp.cmd) {
|
||||
case QLCNIC_RCODE_INVALID_ARGS:
|
||||
dev_err(&pdev->dev, "CDRP invalid args: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
break;
|
||||
case QLCNIC_RCODE_NOT_SUPPORTED:
|
||||
case QLCNIC_RCODE_NOT_IMPL:
|
||||
dev_err(&pdev->dev,
|
||||
"CDRP command not supported: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
break;
|
||||
case QLCNIC_RCODE_NOT_PERMITTED:
|
||||
dev_err(&pdev->dev,
|
||||
"CDRP requested action not permitted: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
break;
|
||||
case QLCNIC_RCODE_INVALID:
|
||||
dev_err(&pdev->dev,
|
||||
"CDRP invalid or unknown cmd received: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
break;
|
||||
case QLCNIC_RCODE_TIMEOUT:
|
||||
dev_err(&pdev->dev, "CDRP command timeout: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
break;
|
||||
default:
|
||||
dev_err(&pdev->dev, "CDRP command failed: 0x%x.\n",
|
||||
cmd->rsp.cmd);
|
||||
}
|
||||
} else if (rsp == QLCNIC_CDRP_RSP_OK) {
|
||||
cmd->rsp.cmd = QLCNIC_RCODE_SUCCESS;
|
||||
if (cmd->rsp.arg2)
|
||||
|
@ -957,9 +984,6 @@ int qlcnic_get_mac_stats(struct qlcnic_adapter *adapter,
|
|||
mac_stats->mac_rx_jabber = le64_to_cpu(stats->mac_rx_jabber);
|
||||
mac_stats->mac_rx_dropped = le64_to_cpu(stats->mac_rx_dropped);
|
||||
mac_stats->mac_rx_crc_error = le64_to_cpu(stats->mac_rx_crc_error);
|
||||
} else {
|
||||
dev_info(&adapter->pdev->dev,
|
||||
"%s: Get mac stats failed =%d.\n", __func__, err);
|
||||
}
|
||||
|
||||
dma_free_coherent(&adapter->pdev->dev, stats_size, stats_addr,
|
||||
|
|
Loading…
Reference in a new issue