From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>

If REQ_DRIVE_* request fails ide_end_drive_cmd() should be called for it not
->end_request().  This was broken by 2.6.5, fix it.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/scsi/ide-scsi.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -puN drivers/scsi/ide-scsi.c~ide-fix-req_drive_-requests-error-handling-in-ide-scsi drivers/scsi/ide-scsi.c
--- 25/drivers/scsi/ide-scsi.c~ide-fix-req_drive_-requests-error-handling-in-ide-scsi	Fri Jun 11 15:58:49 2004
+++ 25-akpm/drivers/scsi/ide-scsi.c	Fri Jun 11 15:58:49 2004
@@ -318,6 +318,13 @@ ide_startstop_t idescsi_atapi_error (ide
 	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
 		return ide_stopped;
 
+	/* retry only "normal" I/O: */
+	if (rq->flags & (REQ_DRIVE_CMD | REQ_DRIVE_TASK | REQ_DRIVE_TASKFILE)) {
+		rq->errors = 1;
+		ide_end_drive_cmd(drive, stat, err);
+		return ide_stopped;
+	}
+
 	if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
 		/* force an abort */
 		HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
_