[PATCH 3/5] hpsa: Return SCSI_MLQUEUE_HOST_BUSY on command allocationfailure.

From: Stephen M. Cameron
Date: Tue Dec 08 2009 - 16:36:44 EST


From: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx>

hpsa: Return SCSI_MLQUEUE_HOST_BUSY on command allocation failure.

Signed-off-by: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx>
---
drivers/scsi/hpsa.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8b8ddfc..0e696ee 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1842,9 +1842,7 @@ static int hpsa_scsi_queue_command(struct scsi_cmnd *cmd,
spin_unlock_irqrestore(&h->lock, flags);
if (c == NULL) { /* trouble... */
dev_err(&h->pdev->dev, "cmd_alloc returned NULL!\n");
- cmd->result = DID_NO_CONNECT << 16;
- done(cmd);
- return 0;
+ return SCSI_MLQUEUE_HOST_BUSY;
}

/* Fill in the command list header */

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