aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-eh.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-eh.c
parent6902a5331256e1b9f4cef95a1e3622252113b260 (diff)
downloadkernel_samsung_espresso10-89f78b3261f7e331e41753ea2459fbb9b60a6f7a.zip
kernel_samsung_espresso10-89f78b3261f7e331e41753ea2459fbb9b60a6f7a.tar.gz
kernel_samsung_espresso10-89f78b3261f7e331e41753ea2459fbb9b60a6f7a.tar.bz2
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-eh.c')
-rw-r--r--drivers/ide/ide-eh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c
index d1385d3..6ad4194 100644
--- a/drivers/ide/ide-eh.c
+++ b/drivers/ide/ide-eh.c
@@ -146,8 +146,11 @@ static inline void ide_complete_drive_reset(ide_drive_t *drive, int err)
{
struct request *rq = drive->hwif->rq;
- if (rq && blk_special_request(rq) && rq->cmd[0] == REQ_DRIVE_RESET)
+ if (rq && blk_special_request(rq) && rq->cmd[0] == REQ_DRIVE_RESET) {
+ if (err <= 0 && rq->errors == 0)
+ rq->errors = -EIO;
ide_end_request(drive, err ? err : 1, 0);
+ }
}
/* needed below */