From dcc7a924db25168fb3e436176931876defa70bdd Mon Sep 17 00:00:00 2001 From: Markus Lidel Date: Mon, 18 Oct 2004 18:30:14 -0700 Subject: [PATCH] [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: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/message/i2o/i2o_scsi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c index edfb818042324..1af468cb3ecf9 100644 --- a/drivers/message/i2o/i2o_scsi.c +++ b/drivers/message/i2o/i2o_scsi.c @@ -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 */ -- 2.53.0