summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:43 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:43 +0100
commit89f78b3261f7e331e41753ea2459fbb9b60a6f7a (patch)
treef294393d4d4a1db653c5f0ce7b5504ff589e4a3b /drivers/ide/ide-atapi.c
parentide: pass error value to ide_complete_rq() (diff)
downloadlinux-89f78b3261f7e331e41753ea2459fbb9b60a6f7a.tar.xz
linux-89f78b3261f7e331e41753ea2459fbb9b60a6f7a.zip
ide: move rq->errors quirk out from ide_end_request()
Move rq->errors quirk out from ide_end_request() to its call sites. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 5d57af29c4c8..5504a84e9bd6 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -405,8 +405,13 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
if (blk_special_request(rq)) {
rq->errors = 0;
ide_complete_rq(drive, 0);
- } else
+ } else {
+ if (blk_fs_request(rq) == 0 && uptodate <= 0) {
+ if (rq->errors == 0)
+ rq->errors = -EIO;
+ }
ide_end_request(drive, uptodate, 0);
+ }
return ide_stopped;
}