aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorWillem Riede <wrlk@riede.org>2005-10-30 19:03:49 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-11-06 13:40:51 -0500
commit3256534776203d4d86fea508e66cfde2b06d39a2 (patch)
treeb4025ca2639fe91489912cdb9a5034bd33a64749 /drivers/scsi/ide-scsi.c
parent8c0ae656230072eb29bde976d0a0a88d0b253a04 (diff)
[SCSI] ide-scsi fails to call idescsi_check_condition for things like "Medium not present"
This patch started life as a response to fedora specific ide subsystem changes that made error handling of my ATAPI tape drive fail; the specifics are in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868 The insertion of the statement rq->errors = err; near the end of ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c anymore. Recent mainline kernels now also have this change. Signed-off-by: Willem Riede <wrlk@riede.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index f04f3289938d..50d0cec54777 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -395,6 +395,7 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
395 int log = test_bit(IDESCSI_LOG_CMD, &scsi->log); 395 int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
396 struct Scsi_Host *host; 396 struct Scsi_Host *host;
397 u8 *scsi_buf; 397 u8 *scsi_buf;
398 int errors = rq->errors;
398 unsigned long flags; 399 unsigned long flags;
399 400
400 if (!(rq->flags & (REQ_SPECIAL|REQ_SENSE))) { 401 if (!(rq->flags & (REQ_SPECIAL|REQ_SENSE))) {
@@ -421,11 +422,11 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
421 printk (KERN_WARNING "ide-scsi: %s: timed out for %lu\n", 422 printk (KERN_WARNING "ide-scsi: %s: timed out for %lu\n",
422 drive->name, pc->scsi_cmd->serial_number); 423 drive->name, pc->scsi_cmd->serial_number);
423 pc->scsi_cmd->result = DID_TIME_OUT << 16; 424 pc->scsi_cmd->result = DID_TIME_OUT << 16;
424 } else if (rq->errors >= ERROR_MAX) { 425 } else if (errors >= ERROR_MAX) {
425 pc->scsi_cmd->result = DID_ERROR << 16; 426 pc->scsi_cmd->result = DID_ERROR << 16;
426 if (log) 427 if (log)
427 printk ("ide-scsi: %s: I/O error for %lu\n", drive->name, pc->scsi_cmd->serial_number); 428 printk ("ide-scsi: %s: I/O error for %lu\n", drive->name, pc->scsi_cmd->serial_number);
428 } else if (rq->errors) { 429 } else if (errors) {
429 if (log) 430 if (log)
430 printk ("ide-scsi: %s: check condition for %lu\n", drive->name, pc->scsi_cmd->serial_number); 431 printk ("ide-scsi: %s: check condition for %lu\n", drive->name, pc->scsi_cmd->serial_number);
431 if (!idescsi_check_condition(drive, rq)) 432 if (!idescsi_check_condition(drive, rq))