Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	linux-scsi@vger.kernel.org, Quinn Tran <qutran@marvell.com>,
	Himanshu Madhani <hmadhani@marvell.com>
Subject: Re: [PATCH] Revert "qla2xxx: Fix Nport ID display value"
Date: Thu, 5 Dec 2019 22:03:03 -0800	[thread overview]
Message-ID: <90b2e3b3-4d9c-d997-37a3-fb8c5bc6d927@acm.org> (raw)
In-Reply-To: <20191204120715.dgpr6xcdcckkae4q@SPB-NB-133.local>

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;

  reply	other threads:[~2019-12-06  6:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09  4:21 [PATCH] Revert "qla2xxx: Fix Nport ID display value" Bart Van Assche
2019-11-11 11:28 ` Roman Bolshakov
2019-11-12  2:48   ` Bart Van Assche
2019-11-13 15:29     ` Himanshu Madhani
2019-11-14  2:34       ` Bart Van Assche
2019-11-20  0:15         ` Bart Van Assche
2019-11-20 21:39           ` Himanshu Madhani
2019-11-21  3:26             ` Bart Van Assche
2019-12-02 16:40   ` Bart Van Assche
2019-12-02 20:55     ` Roman Bolshakov
2019-12-03  2:34       ` Bart Van Assche
2019-12-04 12:07         ` Roman Bolshakov
2019-12-06  6:03           ` Bart Van Assche [this message]
2019-12-09 23:18             ` Martin K. Petersen
2019-12-10 19:38               ` [EXT] " Himanshu Madhani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90b2e3b3-4d9c-d997-37a3-fb8c5bc6d927@acm.org \
    --to=bvanassche@acm.org \
    --cc=hmadhani@marvell.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=qutran@marvell.com \
    --cc=r.bolshakov@yadro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox