Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b22f687d authored by Pete Wyckoff's avatar Pete Wyckoff Committed by James Bottomley
Browse files

[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: default avatarPete Wyckoff <pw@osc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent a52decaf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ 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;
	}