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: Mon, 2 Dec 2019 08:40:17 -0800	[thread overview]
Message-ID: <af903206-ce02-ef50-567f-d647efe0476a@acm.org> (raw)
In-Reply-To: <20191111112804.nycfzaddewlz6yzl@SPB-NB-133.local>

On 11/11/19 3:28 AM, Roman Bolshakov wrote:
> On Fri, Nov 08, 2019 at 08:21:35PM -0800, Bart Van Assche wrote:
>> The commit mentioned in the subject breaks point-to-point mode for at least
>> the QLE2562 HBA. Restore point-to-point support by reverting that commit.
>>
>> Cc: Roman Bolshakov <r.bolshakov@yadro.com>
>> Cc: Quinn Tran <qutran@marvell.com>
>> Cc: Himanshu Madhani <hmadhani@marvell.com>
>> Fixes: 0aabb6b699f7 ("scsi: qla2xxx: Fix Nport ID display value") > Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>>   drivers/scsi/qla2xxx/qla_iocb.c | 7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
>> index b25f87ff8cde..cfd686fab1b1 100644
>> --- a/drivers/scsi/qla2xxx/qla_iocb.c
>> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
>> @@ -2656,10 +2656,9 @@ 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;
>> +	els_iocb->s_id[0] = vha->d_id.b.al_pa;
>> +	els_iocb->s_id[1] = vha->d_id.b.area;
>> +	els_iocb->s_id[2] = vha->d_id.b.domain;
>>   
>>   	if (elsio->u.els_logo.els_cmd == ELS_DCMD_PLOGI) {
>>   		els_iocb->control_flags = 0;
> 
> The original commit definitely fixes P2P mode for QLE2700, the lowest
> byte is domain, followed by AL_PA, followed by area. However the
> fields are reserved in ELS IOCB for QLE2500, according to FW spec.
> 
> Perhaps we should have a switch here for 2500 and the other one for
> 2600/2700? Or, we should only set the fields only for QLE2700, to comply
> with both specs.

Hi Roman,

How about the patch below? Leaving out the els_iocb->s_id[] initialization
is not sufficient on 2500 series adapters to restore point-to-point mode.
The patch below works fine on my setup.

Thanks,

Bart.

diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index b25f87ff8cde..e2e91b3f2e65 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -2656,10 +2656,16 @@ 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)) {
+		els_iocb->s_id[0] = vha->d_id.b.al_pa;
+		els_iocb->s_id[1] = vha->d_id.b.area;
+		els_iocb->s_id[2] = vha->d_id.b.domain;
+	} else {
+		/* 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;

  parent reply	other threads:[~2019-12-02 16:40 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 [this message]
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
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=af903206-ce02-ef50-567f-d647efe0476a@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