scsi: qedf: Add more defensive checks for concurrent error conditions
During an uplink toggle test all error handling is done via timeout and firmware error conditions which can occur concurrently: - SCSI layer timeouts - Error detect CQEs - Firmware detected underruns - ABTS timeouts All these concurrent events require more defensive checks in the driver including: - Check both internally and externally generated aborts to make sure the xid is not already been aborted in another context or in cleanup. - Check back pointers in qedf_cmd_timeout to verify the context of the io_req, fcport and qedf_ctx - Check rport state in host reset handler to not reset the whole host if the rport is already uploaded or in the process of relogin - Check to state for an fcport before initiating a middle path ELS request Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

父節點
4f4616ceeb
當前提交
f3690a89f9
@@ -14,8 +14,8 @@ static int qedf_initiate_els(struct qedf_rport *fcport, unsigned int op,
|
||||
void (*cb_func)(struct qedf_els_cb_arg *cb_arg),
|
||||
struct qedf_els_cb_arg *cb_arg, uint32_t timer_msec)
|
||||
{
|
||||
struct qedf_ctx *qedf = fcport->qedf;
|
||||
struct fc_lport *lport = qedf->lport;
|
||||
struct qedf_ctx *qedf;
|
||||
struct fc_lport *lport;
|
||||
struct qedf_ioreq *els_req;
|
||||
struct qedf_mp_req *mp_req;
|
||||
struct fc_frame_header *fc_hdr;
|
||||
@@ -29,6 +29,15 @@ static int qedf_initiate_els(struct qedf_rport *fcport, unsigned int op,
|
||||
unsigned long flags;
|
||||
u16 sqe_idx;
|
||||
|
||||
if (!fcport) {
|
||||
QEDF_ERR(NULL, "fcport is NULL");
|
||||
rc = -EINVAL;
|
||||
goto els_err;
|
||||
}
|
||||
|
||||
qedf = fcport->qedf;
|
||||
lport = qedf->lport;
|
||||
|
||||
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Sending ELS\n");
|
||||
|
||||
rc = fc_remote_port_chkready(fcport->rport);
|
||||
|
Reference in New Issue
Block a user