]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qla2xxx: Wait for all conflicts before ack'ing PLOGI
authorAlexei Potashnik <alexei@purestorage.com>
Wed, 13 Sep 2017 09:09:48 +0000 (14:39 +0530)
committerBrian Maly <brian.maly@oracle.com>
Thu, 2 Nov 2017 18:14:15 +0000 (14:14 -0400)
commitaccc4b55dbdb4395ab753ea296a08332b16f8dda
tree045150dfdd6a10f3c32dde8e0def70df5862b37b
parentdd9c802f0785bed73c344c802c0fb6aacf7798ae
qla2xxx: Wait for all conflicts before ack'ing PLOGI

Orabug: 2684419726923029

Until now ack'ing of a new PLOGI has only been delayed if there
was an existing session for the same WWN. Ack was released when
the session deletion completed.

If there was another WWN session with the same fc_id/loop_id pair
(aka "conflicting session"), PLOGI was still ack'ed immediately.
This potentially caused a problem when old session deletion logged
fc_id/loop_id out of FW after new session has been established.

Two work-arounds were attempted before:
1. Dropping PLOGIs until conflicting session goes away.
2. Detecting initiator being logged out of FW and issuing LOGO
to force re-login.

This patch introduces proper solution to the problem where PLOGI
is held until either existing session with same WWN or any
conflicting session goes away. Mechanism supports one session holding
two PLOGI acks as well as one PLOGI ack being held by many sessions.

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Acked-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/qla_target.h