]> git.hungrycats.org Git - linux/commitdiff
[PATCH] i2o: correct error code if bus is busy in i2o_scsi
authorMarkus Lidel <markus.lidel@shadowconnect.com>
Tue, 19 Oct 2004 01:30:14 +0000 (18:30 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:30:14 +0000 (18:30 -0700)
- 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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/message/i2o/i2o_scsi.c

index edfb818042324cb0eb288acf858be92c52cfcb26..1af468cb3ecf9818c8f27e258a2efb54d8196962 100644 (file)
@@ -301,6 +301,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
        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_controller *c, u32 m,
                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_controller *c, u32 m,
                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 */