linux_dsm_epyc7002/drivers/scsi/lpfc
James Smart 0a9e9687ac scsi: lpfc: Defer LS_ACC to FLOGI on point to point logins
The current discovery state machine the driver treated FLOGI oddly.  When
point to point, an FLOGI is to be exchanged by the two ports, with the port
with the most significant WWN then proceeding with PLOGI.  The
implementation in the driver was keyed to closely with "what have I sent",
not with what has happened between the two endpoints. Thus, it blatantly
would ACC an FLOGI, but reject PLOGI's until it had its FLOGI ACC'd. The
problem is - the sending of FLOGI may be delayed for some reason, or the
response to FLOGI held off by the other side. In the failing situation the
other side sent an FLOGI, which was ACC'd, then sent PLOGIs which were then
rjt'd until the retry count for the PLOGIs were exceeded and the port gave
up. The FLOGI may have been very late in transmit, or the response held off
until the PLOGIs failed. Given the other port had the higher WWN, no PLOGIs
would occur and communication stopped.

Correct the situation by changing the FLOGI handling. Defer any response to
an FLOGI until the driver has sent its FLOGI as well. Then, upon either
completion of the sent FLOGI, or upon sending an ACC to a received FLOGI
(which may be received before or just after FLOGI was sent). the driver
will act on who has the higher WWN. if the other port does, the driver will
noop any handling of an FLOGI response (if outstanding) and wait for PLOGI.
If the local port does, the driver will transition to sending PLOGI and
will noop any action on responding to an FLOGI (if not yet received).

Fortunately, to implement this, it only took another state flag and
deferring any FLOGI response if the FLOGI has yet to be transmit. All
subsequent actions were already in place.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-07 22:35:32 -05:00
..
lpfc_attr.c scsi: lpfc: Cap NPIV vports to 256 2018-12-07 22:35:32 -05:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_bsg.h scsi: lpfc: add Trunking support 2018-11-06 20:42:51 -05:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_ct.c scsi: lpfc: update manufacturer attribute to reflect Broadcom 2018-12-07 22:35:31 -05:00
lpfc_debugfs.c scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_debugfs.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_disc.h scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_els.c scsi: lpfc: Defer LS_ACC to FLOGI on point to point logins 2018-12-07 22:35:32 -05:00
lpfc_hbadisc.c scsi: lpfc: Defer LS_ACC to FLOGI on point to point logins 2018-12-07 22:35:32 -05:00
lpfc_hw4.h scsi: lpfc: add Trunking support 2018-11-06 20:42:51 -05:00
lpfc_hw.h scsi: lpfc: ls_rjt erroneus FLOGIs 2018-12-07 22:35:32 -05:00
lpfc_ids.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_init.c scsi: lpfc: Cap NPIV vports to 256 2018-12-07 22:35:32 -05:00
lpfc_logmsg.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_mbox.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_mem.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Fix discovery failures during port failovers with lots of vports 2018-12-07 22:35:32 -05:00
lpfc_nvme.c SCSI misc on 20181024 2018-10-25 07:40:30 -07:00
lpfc_nvme.h scsi: lpfc: Limit tracking of tgt queue depth in fast path 2018-08-02 15:45:19 -04:00
lpfc_nvmet.c scsi: lpfc: Fix errors in log messages. 2018-09-11 20:37:33 -04:00
lpfc_nvmet.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_scsi.c scsi: lpfc: Fix a duplicate 0711 log message number. 2018-12-07 22:35:32 -05:00
lpfc_scsi.h scsi: lpfc: add Trunking support 2018-11-06 20:42:51 -05:00
lpfc_sli4.h scsi: lpfc: add Trunking support 2018-11-06 20:42:51 -05:00
lpfc_sli.c scsi: lpfc: Fix kernel Oops due to null pring pointers 2018-12-07 22:35:32 -05:00
lpfc_sli.h scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_version.h scsi: lpfc: update driver version to 12.0.0.8 2018-11-06 20:42:51 -05:00
lpfc_vport.c scsi: lpfc: refactor mailbox structure context fields 2018-12-07 22:35:32 -05:00
lpfc_vport.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc.h scsi: lpfc: Defer LS_ACC to FLOGI on point to point logins 2018-12-07 22:35:32 -05:00
Makefile scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00