Commit dcc7a924 authored by Markus Lidel's avatar Markus Lidel Committed by Linus Torvalds

[PATCH] i2o: correct error code if bus is busy in i2o_scsi

- 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: default avatarMarkus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 51cee03b
...@@ -301,6 +301,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m, ...@@ -301,6 +301,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
if (msg->u.head[0] & (1 << 13)) { if (msg->u.head[0] & (1 << 13)) {
struct i2o_message *pmsg; /* preserved message */ struct i2o_message *pmsg; /* preserved message */
u32 pm; u32 pm;
int err = DID_ERROR;
pm = le32_to_cpu(&msg->body[3]); pm = le32_to_cpu(&msg->body[3]);
...@@ -318,7 +319,10 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m, ...@@ -318,7 +319,10 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
if (msg->body[0] & (1 << 18)) if (msg->body[0] & (1 << 18))
printk(KERN_ERR "Path State.\n"); printk(KERN_ERR "Path State.\n");
if (msg->body[0] & (1 << 18)) if (msg->body[0] & (1 << 18))
{
printk(KERN_ERR "Congestion.\n"); printk(KERN_ERR "Congestion.\n");
err = DID_BUS_BUSY;
}
printk(KERN_DEBUG "Failing message is %p.\n", pmsg); printk(KERN_DEBUG "Failing message is %p.\n", pmsg);
...@@ -326,7 +330,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m, ...@@ -326,7 +330,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
if (!cmd) if (!cmd)
return 1; return 1;
cmd->result = DID_ERROR << 16; cmd->result = err << 16;
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
/* Now flush the message by making it a NOP */ /* Now flush the message by making it a NOP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment