Commit 229531be authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

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: default avatarBart Van Assche <bvanassche@acm.org>
Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 42d387be
...@@ -395,9 +395,9 @@ static void uas_data_cmplt(struct urb *urb) ...@@ -395,9 +395,9 @@ static void uas_data_cmplt(struct urb *urb)
if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN) if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
uas_log_cmd_state(cmnd, "data cmplt err", status); uas_log_cmd_state(cmnd, "data cmplt err", status);
/* error: no data transfered */ /* error: no data transfered */
sdb->resid = sdb->length; scsi_set_resid(cmnd, sdb->length);
} else { } else {
sdb->resid = sdb->length - urb->actual_length; scsi_set_resid(cmnd, sdb->length - urb->actual_length);
} }
uas_try_complete(cmnd, __func__); uas_try_complete(cmnd, __func__);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment