From 0d95716d6a1308c465d8c17ed1a217628936bb0c Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Fri, 11 Nov 2005 05:31:40 -0600 Subject: [SCSI] complete the whole command when it is REQ_BLOCK_PC sd does not allow scsi_io_completion to retry commands for SG_IO requests, and it make sense that it should not happen for st SG_IO commands too. If for st we hit the bottom of scsi_io_completion we will probably screw things up pretty bad. This patch returns to the block layer that the whole command completed and relies on the caller to check the request errors field. For initialization commands like in sd, this adds the previous behavior where scsi_io_completion did not process the error. Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/st.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/st.c') diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 6d9078705c5b..053444b027d4 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -4185,7 +4185,11 @@ static void scsi_tape_release(struct kref *kref) static void st_intr(struct scsi_cmnd *SCpnt) { - scsi_io_completion(SCpnt, (SCpnt->result ? 0: SCpnt->bufflen), 1); + /* + * The caller should be checking the request's errors + * value. + */ + scsi_io_completion(SCpnt, SCpnt->bufflen, 0); } /* -- cgit v1.2.2