Re: [PATCH Linux 2.6.12-rc5-mm2 03/09] blk: make ide use -EOPNOTSUPP instead of -EIO on ABRT_ERR

From: Tejun Heo
Date: Sun Jun 05 2005 - 01:07:11 EST


03_blk_ide_eopnotsupp.patch

Use -EOPNOTSUPP instead of -EIO on ABRT_ERR.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

ide-io.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)

Index: blk-fixes/drivers/ide/ide-io.c
===================================================================
--- blk-fixes.orig/drivers/ide/ide-io.c 2005-06-05 14:53:32.000000000 +0900
+++ blk-fixes/drivers/ide/ide-io.c 2005-06-05 14:53:33.000000000 +0900
@@ -305,6 +305,7 @@ void ide_end_drive_cmd (ide_drive_t *dri
ide_hwif_t *hwif = HWIF(drive);
unsigned long flags;
struct request *rq;
+ int uptodate;

spin_lock_irqsave(&ide_lock, flags);
rq = HWGROUP(drive)->rq;
@@ -379,7 +380,10 @@ void ide_end_drive_cmd (ide_drive_t *dri
blkdev_dequeue_request(rq);
HWGROUP(drive)->rq = NULL;
rq->errors = err;
- end_that_request_last(rq, !rq->errors);
+ uptodate = 1;
+ if (err)
+ uptodate = err & ABRT_ERR ? -EOPNOTSUPP : -EIO;
+ end_that_request_last(rq, uptodate);
spin_unlock_irqrestore(&ide_lock, flags);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/