[PATCH] ide-scsi.c, kernel 2.2.1

Chris Read (chris@tmbtech.com)
Sun, 31 Jan 1999 21:49:13 +0200


This is a multi-part message in MIME format.
--------------4C81EE58FA50068507B111FE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Greetings all...

In 2.2.0-pre8, a change was made to the ide-scsi system to ignore
multiple luns on ide devices. This caused my system to hang on boot and
report a command timeout. I have changed the way the system handles
these invalid luns by changing the scsi command result from DID_ERROR to
DID_BAD_TARGET (which makes sense to me) and all is fine now on my
system.

Please CC me in any comments, flames :-), etc as I am not a member of
the list.

Chris
--------------4C81EE58FA50068507B111FE
Content-Type: text/plain; charset=us-ascii; name="README"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="README"

This is a little patch to stop the ide-scsi driver hanging my system when it
tries to stop multi-lun detections.

Chris Read
chris@hulk.tmbtech.com

--------------4C81EE58FA50068507B111FE
Content-Type: text/plain; charset=us-ascii; name="ide-scsi.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ide-scsi.c.diff"

--- linux-2.2.1/drivers/scsi/ide-scsi.c Sun Jan 31 21:19:33 1999
+++ linux/drivers/scsi/ide-scsi.c Sun Jan 31 21:30:37 1999
@@ -731,7 +731,7 @@
goto abort;
}
if (cmd->lun != 0) { /* Only respond to LUN 0. Drop others */
- goto abort;
+ goto multi_lun;
}
scsi = drive->driver_data;
pc = kmalloc (sizeof (idescsi_pc_t), GFP_ATOMIC);
@@ -783,6 +783,10 @@
if (pc) kfree (pc);
if (rq) kfree (rq);
cmd->result = DID_ERROR << 16;
+ done(cmd);
+ return 0;
+multi_lun:
+ cmd->result = DID_BAD_TARGET << 16;
done(cmd);
return 0;
}

--------------4C81EE58FA50068507B111FE--

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