On 2019-12-04 04:07, Roman Bolshakov wrote: > Firmware can do implicit login, and this is how it worked for a while. > > Then explicit login was introduced in the commit you referenced by > setting bit 8 in IFCB fimwrare options 3 for 2600/2700 series and > issuing ELS IOCB. However, for 2500 series, bit 7 should be set to > disable implicit logins. > > The latest commits that touches the bit is 8777e4314d397 ("scsi: qla2xxx: > Migrate NVME N2N handling into state machine"). It sets the bit in > qla24xx_nvram_config regadless of chip. > > Does it help to set bit 7 in IFCB, firmware options 3 for 2500 series > and leave the RESERVED S_ID field untouched? Hi Roman, Although I'm not sure whether the patch below is what you had in mind, it triggers a long sequence of the following messages: qla2xxx [0000:00:0a.0]-280d:8: HBA in N P2P topology. qla2xxx [0000:00:0a.0]-2814:8: Configure loop -- dpc flags = 0x1260. qla2xxx [0000:00:0a.0]-2811:8: Entries in ID list (1). qla2xxx [0000:00:0a.0]-286a:8: qla2x00_configure_loop *** FAILED ***. qla2xxx [0000:00:0a.0]-280d:8: HBA in N P2P topology. qla2xxx [0000:00:0a.0]-2814:8: Configure loop -- dpc flags = 0x1260. qla2xxx [0000:00:0a.0]-2811:8: Entries in ID list (1). qla2xxx [0000:00:0a.0]-286a:8: qla2x00_configure_loop *** FAILED ***. diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 6c28f38f8021..b7ab1a5d6b0e 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -7291,8 +7291,14 @@ qla24xx_nvram_config(scsi_qla_host_t *vha) if (ql2xloginretrycount) ha->login_retry_count = ql2xloginretrycount; - /* N2N: driver will initiate Login instead of FW */ - icb->firmware_options_3 |= BIT_8; + if (!(IS_QLA23XX(vha->hw) || IS_QLA24XX(vha->hw) || + IS_QLA25XX(vha->hw))) { + /* N2N: driver will initiate login instead of FW */ + icb->firmware_options_3 |= BIT_8; + } else { + /* Disable implicit N2N logins */ + icb->firmware_options_3 |= BIT_7; + } /* Enable ZIO. */ if (!vha->flags.init_done) { diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index b25f87ff8cde..7aaabad88cf2 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2656,10 +2656,13 @@ qla24xx_els_logo_iocb(srb_t *sp, struct els_entry_24xx *els_iocb) els_iocb->port_id[0] = sp->fcport->d_id.b.al_pa; els_iocb->port_id[1] = sp->fcport->d_id.b.area; els_iocb->port_id[2] = sp->fcport->d_id.b.domain; - /* For SID the byte order is different than DID */ - els_iocb->s_id[1] = vha->d_id.b.al_pa; - els_iocb->s_id[2] = vha->d_id.b.area; - els_iocb->s_id[0] = vha->d_id.b.domain; + if (!(IS_QLA23XX(vha->hw) || IS_QLA24XX(vha->hw) || + IS_QLA25XX(vha->hw))) { + /* For SID the byte order is different than DID */ + els_iocb->s_id[1] = vha->d_id.b.al_pa; + els_iocb->s_id[2] = vha->d_id.b.area; + els_iocb->s_id[0] = vha->d_id.b.domain; + } if (elsio->u.els_logo.els_cmd == ELS_DCMD_PLOGI) { els_iocb->control_flags = 0;