]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/ide/ide-atapi.c
Merge branch 'for-2.6.31' of git://git.kernel.dk/linux-2.6-block
[mirror_ubuntu-bionic-kernel.git] / drivers / ide / ide-atapi.c
index 8a894fa37b530d2841e77f6db60c7104a660d7e8..757e5956b13297f38a204740486f9907c35a0ae7 100644 (file)
@@ -415,6 +415,12 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
                if ((pc->flags & PC_FLAG_WAIT_FOR_DSC) && (stat & ATA_DSC) == 0)
                        dsc = 1;
 
+               /*
+                * ->pc_callback() might change rq->data_len for
+                * residual count, cache total length.
+                */
+               done = blk_rq_bytes(rq);
+
                /* Command finished - Call the callback function */
                uptodate = drive->pc_callback(drive, dsc);