aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-eh.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:43 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:43 -0400
commit6902a5331256e1b9f4cef95a1e3622252113b260 (patch)
treef33ef1a732425e1862fcf0bbd0e909f82d247a8a /drivers/ide/ide-eh.c
parent37245aabfa0c628ba884cd88fe5cd633b426a1b2 (diff)
ide: pass error value to ide_complete_rq()
Set rq->errors at ide_complete_rq() call sites and then pass error value to ide_complete_rq(). [ Some rq->errors assignments look really wrong but this patch leaves them alone to not introduce too many changes at once. ] 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, 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