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

Commit a87e3a67 authored by Douglas Gilbert's avatar Douglas Gilbert Committed by James Bottomley
Browse files

[SCSI] scsi_debug: set resid to indicate no data-in when medium error



set resid to the requested data-in length when a MEDIUM ERROR is
simulated. This implies no valid data is returned in the data-in
buffer

Signed-off-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent a8733c7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1805,6 +1805,7 @@ static int resp_read(struct scsi_cmnd *SCpnt, unsigned long long lba,
			devip->sense_buff[5] = (ret >> 8) & 0xff;
			devip->sense_buff[6] = ret & 0xff;
		}
	        scsi_set_resid(SCpnt, scsi_bufflen(SCpnt));
		return check_condition_result;
	}