lkml.org 
[lkml]   [2005]   [Jun]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromTejun Heo <>
SubjectRe: [PATCH Linux 2.6.12-rc5-mm2 03/09] blk: make ide use -EOPNOTSUPP instead of -EIO on ABRT_ERR
DateSun, 5 Jun 2005 14:57:19 +0900 (KST)
03_blk_ide_eopnotsupp.patch

	Use -EOPNOTSUPP instead of -EIO on ABRT_ERR.

Signed-off-by: Tejun Heo <htejun@gmail.com>

 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-05 06:09    [from the cache]
©2003-2008