mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
bnxt_re: Stop issuing further cmds to FW once a cmd times out
Once a cmd to FW times out(after 20s) it is reasonable to assume the FW or atleast the control path is dead. No point issuing further cmds to the FW as each subsequent cmd with another 20s timeout will cascade resulting in unnecessary traces and/or NMI Lockups. Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
f9b941baa4
commit
2b6376305d
2 changed files with 6 additions and 1 deletions
|
@ -107,6 +107,9 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_bit(FIRMWARE_TIMED_OUT, &rcfw->flags))
|
||||||
|
return -ETIMEDOUT;
|
||||||
|
|
||||||
/* Cmdq are in 16-byte units, each request can consume 1 or more
|
/* Cmdq are in 16-byte units, each request can consume 1 or more
|
||||||
* cmdqe
|
* cmdqe
|
||||||
*/
|
*/
|
||||||
|
@ -226,6 +229,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
|
||||||
/* timed out */
|
/* timed out */
|
||||||
dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x timedout (%d)msec",
|
dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x timedout (%d)msec",
|
||||||
cookie, opcode, RCFW_CMD_WAIT_TIME_MS);
|
cookie, opcode, RCFW_CMD_WAIT_TIME_MS);
|
||||||
|
set_bit(FIRMWARE_TIMED_OUT, &rcfw->flags);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,9 @@ struct bnxt_qplib_rcfw {
|
||||||
unsigned long *cmdq_bitmap;
|
unsigned long *cmdq_bitmap;
|
||||||
u32 bmap_size;
|
u32 bmap_size;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
#define FIRMWARE_INITIALIZED_FLAG 1
|
#define FIRMWARE_INITIALIZED_FLAG BIT(0)
|
||||||
#define FIRMWARE_FIRST_FLAG BIT(31)
|
#define FIRMWARE_FIRST_FLAG BIT(31)
|
||||||
|
#define FIRMWARE_TIMED_OUT BIT(3)
|
||||||
wait_queue_head_t waitq;
|
wait_queue_head_t waitq;
|
||||||
int (*aeq_handler)(struct bnxt_qplib_rcfw *,
|
int (*aeq_handler)(struct bnxt_qplib_rcfw *,
|
||||||
struct creq_func_event *);
|
struct creq_func_event *);
|
||||||
|
|
Loading…
Reference in a new issue