scsi: uas: Use scsi_[gs]et_resid() where appropriate
This patch does not change any functionality. Cc: Oliver Neukum <oneukum@suse.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
42d387be5b
commit
229531be69
|
@ -395,9 +395,9 @@ static void uas_data_cmplt(struct urb *urb)
|
|||
if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
|
||||
uas_log_cmd_state(cmnd, "data cmplt err", status);
|
||||
/* error: no data transfered */
|
||||
sdb->resid = sdb->length;
|
||||
scsi_set_resid(cmnd, sdb->length);
|
||||
} else {
|
||||
sdb->resid = sdb->length - urb->actual_length;
|
||||
scsi_set_resid(cmnd, sdb->length - urb->actual_length);
|
||||
}
|
||||
uas_try_complete(cmnd, __func__);
|
||||
out:
|
||||
|
|
Loading…
Reference in New Issue