From a0867f49fcefbeedd2f3719ea16a61843c4b3fec Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 24 Jan 2007 13:17:20 +0000 Subject: [PATCH] In Qlogic initiator driver (version 8.01.04) in qla2x00_rff_id() BIT_1 of the RFF_ID Feature bits is set, indicating to the name server that this is an initiator. The attached patch sets BIT_0 instead if target mode is enabled, indicating target mode support to the name server. (See the INCITS FC-GS-4 document). This fixed many of my problems relating to working with a switch fabric, including the discovery and addition of the initiator ports in the fcports list. From Brad Johnson git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@84 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_gs.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/qla2x00t/qla_gs.c b/qla2x00t/qla_gs.c index 2ebf259fc..ab298d5ef 100644 --- a/qla2x00t/qla_gs.c +++ b/qla2x00t/qla_gs.c @@ -538,7 +538,16 @@ qla2x00_rff_id(scsi_qla_host_t *ha) ct_req->req.rff_id.port_id[1] = ha->d_id.b.area; ct_req->req.rff_id.port_id[2] = ha->d_id.b.al_pa; - ct_req->req.rff_id.fc4_feature = BIT_1; +#ifdef FC_TARGET_SUPPORT + /* + * FC-4 Feature bit 0 indicates target functionality to the name server. + */ + if (ha->flags.enable_target_mode) { + ct_req->req.rff_id.fc4_feature = BIT_0 | BIT_1; + } else +#endif + ct_req->req.rff_id.fc4_feature = BIT_1; + ct_req->req.rff_id.fc4_type = 0x08; /* SCSI - FCP */ /* Execute MS IOCB */