
From: Markus Lidel <Markus.Lidel@shadowconnect.com>

- corrected the error code in i2o_scsi_reply to return the correct error
  code DID_BUS_BUSY if bus is busy (original from Alan Cox)

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/message/i2o/i2o_scsi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -puN drivers/message/i2o/i2o_scsi.c~i2o-correct-error-code-if-bus-is-busy-in-i2o_scsi drivers/message/i2o/i2o_scsi.c
--- 25/drivers/message/i2o/i2o_scsi.c~i2o-correct-error-code-if-bus-is-busy-in-i2o_scsi	Fri Oct  8 14:32:40 2004
+++ 25-akpm/drivers/message/i2o/i2o_scsi.c	Fri Oct  8 14:32:40 2004
@@ -301,6 +301,7 @@ static int i2o_scsi_reply(struct i2o_con
 	if (msg->u.head[0] & (1 << 13)) {
 		struct i2o_message *pmsg;	/* preserved message */
 		u32 pm;
+		int err = DID_ERROR;
 
 		pm = le32_to_cpu(&msg->body[3]);
 
@@ -318,7 +319,10 @@ static int i2o_scsi_reply(struct i2o_con
 		if (msg->body[0] & (1 << 18))
 			printk(KERN_ERR "Path State.\n");
 		if (msg->body[0] & (1 << 18))
+		{
 			printk(KERN_ERR "Congestion.\n");
+			err = DID_BUS_BUSY;
+		}
 
 		printk(KERN_DEBUG "Failing message is %p.\n", pmsg);
 
@@ -326,7 +330,7 @@ static int i2o_scsi_reply(struct i2o_con
 		if (!cmd)
 			return 1;
 
-		cmd->result = DID_ERROR << 16;
+		cmd->result = err << 16;
 		cmd->scsi_done(cmd);
 
 		/* Now flush the message by making it a NOP */
_
