Commit 4a1108d6 authored by Satish Kharat's avatar Satish Kharat Committed by Martin K. Petersen
Browse files

scsi: fnic: changing queue command to return result DID_IMM_RETRY when rport is init

Currently the queue command returns DID_NO_CONNECT anytime the rport is
not in RPORT_ST_READY state. Changing it to return DID_NO_CONNECT only
when the rport is in RPORT_ST_DELETE state. When the rport is in one of
the init states retruning DID_IMM_RETRY.

Signed-off-by: default avatarSesidhar Baddela <>
Signed-off-by: default avatarSatish Kharat <>
Signed-off-by: default avatarMartin K. Petersen <>
parent c22fa50b
......@@ -466,15 +466,27 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_
rp = rport->dd_data;
if (!rp || rp->rp_state != RPORT_ST_READY) {
if (!rp || rp->rp_state == RPORT_ST_DELETE) {
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
"returning DID_NO_CONNECT for IO as rport is removed\n");
"rport 0x%x removed, returning DID_NO_CONNECT\n",
sc->result = DID_NO_CONNECT<<16;
return 0;
if (rp->rp_state != RPORT_ST_READY) {
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
"rport 0x%x in state 0x%x, returning DID_IMM_RETRY\n",
rport->port_id, rp->rp_state);
sc->result = DID_IMM_RETRY << 16;
return 0;
if (lp->state != LPORT_ST_READY || !(lp->link_up))
Supports Markdown
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