Commit de706cdb authored by James Bottomley's avatar James Bottomley

SCSI: Updates to non-sector size completion calculations

From: Jens Axboe <axboe@suse.de>, Mike Christie <mikenc@us.ibm.com>
parent 4e54702f
......@@ -524,10 +524,10 @@ static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int uptodate,
* to queue the remainder of them.
*/
if (end_that_request_chunk(req, uptodate, bytes)) {
int leftover = (req->hard_nr_sectors << 9) - bytes;
int leftover = (req->hard_nr_sectors << 9);
if (blk_pc_request(req))
leftover = req->data_len - bytes;
leftover = req->data_len;
/* kill remainder if no retrys */
if (!uptodate && blk_noretry_request(req))
......
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