linux-stable/drivers/s390/scsi
Steffen Maier bd77befa5b zfcp: fix fc_host port_type with NPIV
For an NPIV-enabled FCP device, zfcp can erroneously show
"NPort (fabric via point-to-point)" instead of "NPIV VPORT"
for the port_type sysfs attribute of the corresponding
fc_host.
s390-tools that can be affected are dbginfo.sh and ziomon.

zfcp_fsf_exchange_config_evaluate() ignores
fsf_qtcb_bottom_config.connection_features indicating NPIV
and only sets fc_host_port_type to FC_PORTTYPE_NPORT if
fsf_qtcb_bottom_config.fc_topology is FSF_TOPO_FABRIC.

Only the independent zfcp_fsf_exchange_port_evaluate()
evaluates connection_features to overwrite fc_host_port_type
to FC_PORTTYPE_NPIV in case of NPIV.
Code was introduced with upstream kernel 2.6.30
commit 0282985da5
("[SCSI] zfcp: Report fc_host_port_type as NPIV").

This works during FCP device recovery (such as set online)
because it performs FSF_QTCB_EXCHANGE_CONFIG_DATA followed by
FSF_QTCB_EXCHANGE_PORT_DATA in sequence.

However, the zfcp-specific scsi host sysfs attributes
"requests", "megabytes", or "seconds_active" trigger only
zfcp_fsf_exchange_config_evaluate() resetting fc_host
port_type to FC_PORTTYPE_NPORT despite NPIV.

The zfcp-specific scsi host sysfs attribute "utilization"
triggers only zfcp_fsf_exchange_port_evaluate() correcting
the fc_host port_type again in case of NPIV.

Evaluate fsf_qtcb_bottom_config.connection_features
in zfcp_fsf_exchange_config_evaluate() where it belongs to.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Fixes: 0282985da5 ("[SCSI] zfcp: Report fc_host_port_type as NPIV")
Cc: <stable@vger.kernel.org> #2.6.30+
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-08-12 16:17:12 -04:00
..
Makefile [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_aux.c atomic: Replace atomic_{set,clear}_mask() usage 2015-07-27 14:06:24 +02:00
zfcp_ccw.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_dbf.c scsi: use 64-bit LUNs 2014-07-17 22:07:37 +02:00
zfcp_dbf.h s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
zfcp_def.h zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_erp.c atomic: Replace atomic_{set,clear}_mask() usage 2015-07-27 14:06:24 +02:00
zfcp_ext.h zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_fc.c atomic: Replace atomic_{set,clear}_mask() usage 2015-07-27 14:06:24 +02:00
zfcp_fc.h scsi: remove abuses of scsi_populate_tag 2014-11-12 11:19:41 +01:00
zfcp_fsf.c zfcp: fix fc_host port_type with NPIV 2016-08-12 16:17:12 -04:00
zfcp_fsf.h [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_qdio.c atomic: Replace atomic_{set,clear}_mask() usage 2015-07-27 14:06:24 +02:00
zfcp_qdio.h
zfcp_reqlist.h
zfcp_scsi.c scsi: Do not set cmd_per_lun to 1 in the host template 2015-05-31 18:06:28 -07:00
zfcp_sysfs.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_unit.c zfcp: Revert to original scanning behaviour 2016-04-15 16:53:12 -04:00