remarkable-linux/drivers
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
..
accessibility
acpi More ACPI updates for v4.8-rc1 2016-08-05 23:29:05 -04:00
amba
android
ata New LED class driver: 2016-07-27 14:03:52 -07:00
atm
auxdisplay
base More power management updates for v4.8-rc1 2016-08-05 23:26:16 -04:00
bcma
block block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
bluetooth
bus ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
cdrom
char RTC for 4.8 2016-08-05 09:48:22 -04:00
clk treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
clocksource ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
connector
cpufreq More power management updates for v4.8-rc1 2016-08-05 23:26:16 -04:00
cpuidle powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-08-01 14:28:42 -04:00
dax
dca
devfreq
dio
dma dmaengine updates for 4.8-rc1 2016-07-28 15:45:17 -07:00
dma-buf
edac * Altera Arria10 ethernet FIFO buffer support (Thor Thayer) 2016-07-27 13:40:47 -07:00
eisa
extcon
firewire
firmware tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
fmc
fpga drivers/fpga/Kconfig: fix build failure 2016-08-04 08:50:07 -04:00
gpio
gpu Merge tag 'drm-for-v4.8-zpos' of git://people.freedesktop.org/~airlied/linux 2016-08-07 16:35:08 -07:00
hid Merge branch 'for-4.8/hid-led' into for-linus 2016-07-28 10:49:23 +02:00
hsi
hv
hwmon hwmon updates for v4.8 (take 2) 2016-08-01 16:49:13 -04:00
hwspinlock
hwtracing Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-29 13:55:30 -07:00
i2c powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide 2016-07-29 13:29:06 -07:00
idle Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-30 12:56:26 -07:00
iio
infiniband Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-08-05 23:24:15 -04:00
iommu dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
ipack
irqchip tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
isdn
leds powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
lguest
lightnvm
macintosh powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00
mailbox mailbox: Fix format and type mismatches in Broadcom PDC driver 2016-07-28 21:27:31 +05:30
mcb
md block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
media media updates for v4.8-rc1 2016-08-04 09:59:37 -04:00
memory MTD updates for v4.8: 2016-08-02 17:05:11 -04:00
memstick memstick: don't allocate unused major for ms_block 2016-08-02 17:31:41 -04:00
message
mfd ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
misc virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
mmc MMC core: 2016-07-31 21:36:58 -04:00
mtd This pull request contains mostly cleanups and minor 2016-08-04 19:51:49 -04:00
net virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
nfc
ntb NTB: ntb_hw_intel: use local variable pdev 2016-08-05 10:34:13 -04:00
nubus
nvdimm block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
nvme PCI changes for the v4.8 merge window: 2016-08-02 17:12:29 -04:00
nvmem
of ramoops: use DT reserved-memory bindings 2016-08-05 11:21:36 -07:00
oprofile
parisc dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
parport
pci ACPI / hotplug / PCI: Runtime resume bridges before bus rescans 2016-08-04 21:33:58 -04:00
pcmcia
perf Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-07-29 13:55:30 -07:00
phy MMC core: 2016-07-31 21:36:58 -04:00
pinctrl This is the bulk of pin control changes for the v4.8 kernel cycle. 2016-07-28 17:06:51 -07:00
platform pwm: Changes for v4.8-rc1 2016-08-06 00:01:33 -04:00
pnp PNP: pnpbios: add header file to fix build errors 2016-07-27 18:52:54 +02:00
power ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
powercap
pps
ps3
ptp
pwm pwm: Changes for v4.8-rc1 2016-08-06 00:01:33 -04:00
rapidio rapidio/switches: add driver for IDT gen3 switches 2016-08-02 19:35:38 -04:00
ras
regulator pwm: Changes for v4.8-rc1 2016-08-06 00:01:33 -04:00
remoteproc dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
reset
rpmsg
rtc RTC for 4.8 2016-08-05 09:48:22 -04:00
s390 zfcp: fix fc_host port_type with NPIV 2016-08-12 16:17:12 -04:00
sbus
scsi smartpqi: initial commit of Microsemi smartpqi driver 2016-08-12 16:00:09 -04:00
sfi
sh
sn
soc ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
spi ARM: DT updates for v4.8 2016-08-01 18:37:45 -04:00
spmi
ssb
staging Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-08-07 10:01:14 -04:00
target target: iblock_execute_sync_cache() should use bio_set_op_attrs() 2016-08-07 14:41:02 -06:00
tc
thermal
thunderbolt
tty tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
uio
usb More USB patches for 4.8-rc1 2016-08-05 23:07:43 -04:00
uwb
vfio
vhost virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
video dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
virt
virtio virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00
vlynq
vme
w1 w1:omap_hdq: fix regression 2016-08-02 19:35:40 -04:00
watchdog watchdog: gpio_wdt: Fix missing platform_set_drvdata() in gpio_wdt_probe() 2016-07-27 10:47:43 +02:00
xen dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
zorro
Kconfig
Makefile virtio/vhost: new features for 4.8 2016-08-06 09:20:13 -04:00