Message ID | 56C31295.2020309@huawei.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
>>>>> "Yiwen" == jiangyiwen <jiangyiwen@huawei.com> writes:
Yiwen,
Yiwen> When called scsi_prep_fn return BLKPREP_INVALID, we should use
Yiwen> the same code with BLKPREP_KILL in scsi_prep_return.
You are right!
Applied to 4.5/scsi-fixes.
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index dd8ad2a..d8d2198 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1343,6 +1343,7 @@ scsi_prep_return(struct request_queue *q, struct request *req, int ret) switch (ret) { case BLKPREP_KILL: + case BLKPREP_INVALID: req->errors = DID_NO_CONNECT << 16; /* release the command and kill it */ if (req->special) {