aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-eh.c')
-rw-r--r--drivers/ide/ide-eh.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c
index f6e1a82a3cc5..d1385d332e94 100644
--- a/drivers/ide/ide-eh.c
+++ b/drivers/ide/ide-eh.c
@@ -123,17 +123,18 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat)
123 123
124 /* retry only "normal" I/O: */ 124 /* retry only "normal" I/O: */
125 if (!blk_fs_request(rq)) { 125 if (!blk_fs_request(rq)) {
126 rq->errors = 1;
127 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { 126 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
128 struct ide_cmd *cmd = rq->special; 127 struct ide_cmd *cmd = rq->special;
129 128
130 if (cmd) 129 if (cmd)
131 ide_complete_cmd(drive, cmd, stat, err); 130 ide_complete_cmd(drive, cmd, stat, err);
132 } else if (blk_pm_request(rq)) { 131 } else if (blk_pm_request(rq)) {
132 rq->errors = 1;
133 ide_complete_pm_rq(drive, rq); 133 ide_complete_pm_rq(drive, rq);
134 return ide_stopped; 134 return ide_stopped;
135 } 135 }
136 ide_complete_rq(drive, err); 136 rq->errors = err;
137 ide_complete_rq(drive, err ? -EIO : 0);
137 return ide_stopped; 138 return ide_stopped;
138 } 139 }
139 140