diff options
Diffstat (limited to 'drivers/ide/ide-eh.c')
-rw-r--r-- | drivers/ide/ide-eh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index d1385d332e94..6ad419414f95 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) | |||
146 | { | 146 | { |
147 | struct request *rq = drive->hwif->rq; | 147 | struct request *rq = drive->hwif->rq; |
148 | 148 | ||
149 | if (rq && blk_special_request(rq) && rq->cmd[0] == REQ_DRIVE_RESET) | 149 | if (rq && blk_special_request(rq) && rq->cmd[0] == REQ_DRIVE_RESET) { |
150 | if (err <= 0 && rq->errors == 0) | ||
151 | rq->errors = -EIO; | ||
150 | ide_end_request(drive, err ? err : 1, 0); | 152 | ide_end_request(drive, err ? err : 1, 0); |
153 | } | ||
151 | } | 154 | } |
152 | 155 | ||
153 | /* needed below */ | 156 | /* needed below */ |