From b252f4c7c39cc43c1a34c68951f98d7391a1a103 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Gollapudi Date: Tue, 26 Jul 2011 14:51:40 -0700 Subject: [SCSI] bnx2fc: Enable REC & CONF support for the session Based on PRLI response, identify if the target is FCP-2 (seq level error recovery) capable, and appropriately set the corresponding CONF, REC flags when offloading the session. Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley --- drivers/scsi/bnx2fc/bnx2fc_tgt.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/scsi/bnx2fc/bnx2fc_tgt.c') diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c index 263c2678ff62..7eff269d4c41 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c @@ -353,6 +353,14 @@ static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt, tgt->rq_cons_idx = 0; atomic_set(&tgt->num_active_ios, 0); + if (rdata->flags & FC_RP_FLAGS_RETRY) { + tgt->dev_type = TYPE_TAPE; + tgt->io_timeout = 0; /* use default ULP timeout */ + } else { + tgt->dev_type = TYPE_DISK; + tgt->io_timeout = BNX2FC_IO_TIMEOUT; + } + /* initialize sq doorbell */ sq_db->header.header = B577XX_DOORBELL_HDR_DB_TYPE; sq_db->header.header |= B577XX_FCOE_CONNECTION_TYPE << -- cgit v1.2.1