Commit 88263208 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: Complain if sp->done() is not called from the completion path



Not calling sp->done() from the command completion path is a severe bug.
Hence complain loudly if that happens.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Tested-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Reviewed-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 0dcec41a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -243,6 +243,10 @@ qla2x00_async_iocb_timeout(void *data)
			sp->done(sp, QLA_FUNCTION_TIMEOUT);
		}
		break;
	default:
		WARN_ON_ONCE(true);
		sp->done(sp, QLA_FUNCTION_TIMEOUT);
		break;
	}
}

+4 −0
Original line number Diff line number Diff line
@@ -2786,6 +2786,8 @@ out:

	if (rsp->status_srb == NULL)
		sp->done(sp, res);
	else
		WARN_ON_ONCE(true);
}

/**
@@ -2843,6 +2845,8 @@ qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
	if (sense_len == 0) {
		rsp->status_srb = NULL;
		sp->done(sp, cp->result);
	} else {
		WARN_ON_ONCE(true);
	}
}

+4 −0
Original line number Diff line number Diff line
@@ -2539,6 +2539,8 @@ check_scsi_status:

	if (rsp->status_srb == NULL)
		sp->done(sp, res);
	else
		WARN_ON_ONCE(true);
}

/**
@@ -2616,6 +2618,8 @@ qlafx00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt)
	if (sense_len == 0) {
		rsp->status_srb = NULL;
		sp->done(sp, cp->result);
	} else {
		WARN_ON_ONCE(true);
	}
}