Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b22f687dd28a7a8886b918294b4d558ef175c07d
Commit:     b22f687dd28a7a8886b918294b4d558ef175c07d
Parent:     a52decafbe3fdca5e8430d4f58ffcec1f4a6302c
Author:     Pete Wyckoff <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 13 16:53:28 2007 -0400
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Tue Mar 20 10:53:51 2007 -0500

    [SCSI] set resid in scsi_io_completion() even for check condition
    
    Some targets can return both valid data and sense information.
    Always update the request data_len from the SCSI command residual.
    Callers should interpret sense data to determine what parts of the
    data are valid in case of a CHECK CONDITION status.
    
    Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/scsi_lib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 5f95570..be8e655 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -848,8 +848,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int 
good_bytes)
                                memcpy(req->sense, cmd->sense_buffer,  len);
                                req->sense_len = len;
                        }
-               } else
-                       req->data_len = cmd->resid;
+               }
+               req->data_len = cmd->resid;
        }
 
        /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to