diff options
author | Shyam Sundar <ssundar@marvell.com> | 2019-03-26 08:38:37 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-28 02:54:52 +0100 |
commit | 5d5e55659b375a39a42dad988869cd9966d20255 (patch) | |
tree | 6dc31ba4cf3fa527ece3565294fa5d8b286cbd87 /drivers/scsi/qedf/qedf_els.c | |
parent | scsi: qedf: Simplify s/g list mapping (diff) | |
download | linux-5d5e55659b375a39a42dad988869cd9966d20255.tar.xz linux-5d5e55659b375a39a42dad988869cd9966d20255.zip |
scsi: qedf: Modify flush routine to handle all I/Os and TMF
The purpose of flush routine is to cleanup I/Os to the firmware and
complete them to scsi middle layer. This routine is invoked before
connection is uploaded because of rport going away.
- Don't process any I/Os, aborts, TMFs coming when flush in progress.
- Add flags to handle cleanup and release of I/Os because flush can
prematurely complete I/Os.
- Original command can get completed to driver when cleanup for same is
posted to firmware, handle this condition.
- Modify flush to handle I/Os in all the states like abort, TMF, RRQ and
timeouts.
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_els.c')
-rw-r--r-- | drivers/scsi/qedf/qedf_els.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_els.c b/drivers/scsi/qedf/qedf_els.c index 5178cd03666a..a60819b40eaf 100644 --- a/drivers/scsi/qedf/qedf_els.c +++ b/drivers/scsi/qedf/qedf_els.c @@ -135,6 +135,8 @@ static int qedf_initiate_els(struct qedf_rport *fcport, unsigned int op, QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Ringing doorbell for ELS " "req\n"); qedf_ring_doorbell(fcport); + set_bit(QEDF_CMD_OUTSTANDING, &els_req->flags); + spin_unlock_irqrestore(&fcport->rport_lock, flags); els_err: return rc; @@ -151,6 +153,8 @@ void qedf_process_els_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Entered with xid = 0x%x" " cmd_type = %d.\n", els_req->xid, els_req->cmd_type); + clear_bit(QEDF_CMD_OUTSTANDING, &els_req->flags); + /* Kill the ELS timer */ cancel_delayed_work(&els_req->timeout_work); |