Skip to contentSkip to conversation

zfcp: report port fc_security as unknown early during remote cable pull

PATCH Applied Steffen Maier 2 participants 2 messages Jul 2, 2021 – Jul 13, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zfcp: report port fc_security as unknown early during remote cable pull

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.

Fixes a17c78460093 ("scsi: zfcp: report FC Endpoint Security in sysfs")

---

Martin, James, we have a small zfcp bugfix.
Would be nice if it could still make it into v5.14-rc1 merge window, but I'm probably too late for that. v5.14-rc2 is fine, too. Applies to 5.14/scsi-staging or 5.14/scsi-queue or James' misc branch, or to the corresponding fixes branch(es).

 drivers/s390/scsi/zfcp_sysfs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/s390/scsi/zfcp_sysfs.c +1 -0
index 544efd4c42f0..b8cd75a872ee 100644
@@ -487,6 +487,7 @@ static ssize_t zfcp_sysfs_port_fc_security_show(struct device *dev,
 	if (0 == (status & ZFCP_STATUS_COMMON_OPEN) ||
 	    0 == (status & ZFCP_STATUS_COMMON_UNBLOCKED) ||
 	    0 == (status & ZFCP_STATUS_PORT_PHYS_OPEN) ||
+	    0 != (status & ZFCP_STATUS_PORT_LINK_TEST) ||
 	    0 != (status & ZFCP_STATUS_COMMON_ERP_FAILED) ||
 	    0 != (status & ZFCP_STATUS_COMMON_ACCESS_BOXED))
 		i = sprintf(buf, "unknown\n");
Signature · 1 line
2.25.4
#1 lore raw

Steffen,

Quoted 8 lines

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.

Applied to 5.14/scsi-fixes, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering