return valid data with sense
PATCH 1/1 return valid data with sense
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]>
--- drivers/scsi/scsi_lib.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/scsi_lib.c +2 -2
@@ -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; }/*
Signature · 1 line
1.5.0.2