diff options
author | Nithin Nayak Sujir <nsujir@broadcom.com> | 2011-04-25 15:30:08 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-05-01 12:52:38 -0400 |
commit | 35dd71ae82afaef3980638c528b21f018c46211a (patch) | |
tree | 4d1a2463dcfc2a2d9f40d47857756ee2c40e13c1 /drivers/scsi/bnx2fc/bnx2fc_io.c | |
parent | 0117ddb0c8df8e107bc8e9713c6638270638fff9 (diff) |
[SCSI] bnx2fc: call scsi_done if session goes to not ready from ready
If the session is not ready yet, we ask the SCSI-ml to retry. However, if the
session is just uploaded, we should not retry, but instead call scsi_done to
fail the IO.
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_io.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 1decefbf32e3..b5b5c346d779 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c | |||
@@ -1663,6 +1663,12 @@ int bnx2fc_queuecommand(struct Scsi_Host *host, | |||
1663 | tgt = (struct bnx2fc_rport *)&rp[1]; | 1663 | tgt = (struct bnx2fc_rport *)&rp[1]; |
1664 | 1664 | ||
1665 | if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) { | 1665 | if (!test_bit(BNX2FC_FLAG_SESSION_READY, &tgt->flags)) { |
1666 | if (test_bit(BNX2FC_FLAG_UPLD_REQ_COMPL, &tgt->flags)) { | ||
1667 | sc_cmd->result = DID_NO_CONNECT << 16; | ||
1668 | sc_cmd->scsi_done(sc_cmd); | ||
1669 | return 0; | ||
1670 | |||
1671 | } | ||
1666 | /* | 1672 | /* |
1667 | * Session is not offloaded yet. Let SCSI-ml retry | 1673 | * Session is not offloaded yet. Let SCSI-ml retry |
1668 | * the command. | 1674 | * the command. |