scsi: lpfc: Set Establish Image Pair service parameter only for Target Functions
authorJustin Tee <justin.tee@broadcom.com>
Wed, 12 Jul 2023 18:05:16 +0000 (11:05 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 23 Jul 2023 20:17:07 +0000 (16:17 -0400)
commit04c3200114921ba7223997dc61ddeedc6f581991
treeb3be023b74a49f83522ca5d56b7f8b2a8196b103
parent90cec07f53e9948106e335377cc249414f39684f
scsi: lpfc: Set Establish Image Pair service parameter only for Target Functions

Previously, Establish Image Pair was set in all PRLI_ACC responses
regardless if the received PRLI was from an initiator or target function.
Specific target vendors that can operate in both initiator and target mode,
may view the PRLI_ACC with Establish Image Pair set as an invalid service
parameter when operating in initiator only mode.  This causes discovery
issues later when the target switches on its target mode function.

Revise logic that determines an rport's role as an initiator or target and
set the Establish Image Pair service parameter bit only if the Target
Function bit is set.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230712180522.112722-7-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hw.h
drivers/scsi/lpfc/lpfc_nportdisc.c