scsi: zfcp: Report port fc_security as unknown early during remote cable pull
authorSteffen Maier <maier@linux.ibm.com>
Fri, 2 Jul 2021 16:09:22 +0000 (18:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:36 +0000 (16:05 +0200)
commite1261c7a846e26e35dff8805f95e1d1412207ea5
treea633bf9434d7e362a61c7bac0f04232bfe74e730
parentea518b70ed5e4598c8d706f37fc16f7b06e440bd
scsi: zfcp: Report port fc_security as unknown early during remote cable pull

commit 8b3bdd99c092bbaeaa7d9eecb1a3e5dc9112002b upstream.

On remote cable pull, a zfcp_port keeps its status and only gets
ZFCP_STATUS_PORT_LINK_TEST added. Only after an ADISC timeout, we would
actually start port recovery and remove ZFCP_STATUS_COMMON_UNBLOCKED which
zfcp_sysfs_port_fc_security_show() detected and reported as "unknown"
instead of the old and possibly stale zfcp_port->connection_info.

Add check for ZFCP_STATUS_PORT_LINK_TEST for timely "unknown" report.

Link: https://lore.kernel.org/r/20210702160922.2667874-1-maier@linux.ibm.com
Fixes: a17c78460093 ("scsi: zfcp: report FC Endpoint Security in sysfs")
Cc: <stable@vger.kernel.org> #5.7+
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/scsi/zfcp_sysfs.c