scsi: zfcp: explicitly support initiator in scsi_host_template
authorSteffen Maier <maier@linux.ibm.com>
Thu, 17 May 2018 17:15:02 +0000 (19:15 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:28:14 +0000 (11:28 -0400)
commitb24bf22d72c75c4e32e3520041ccdf7c9a2d9e5a
treef45253480807f2e1a7607eeb2ef57b7f42f40bb0
parent2fdd45fd20f46d6f36dfa4b3e18dec11af074b5f
scsi: zfcp: explicitly support initiator in scsi_host_template

While the default did already correctly print "Initiator" let's make it
explicit and convert zfcp to the feature.

$ cat /sys/class/scsi_host/host0/supported_mode
Initiator

$ cat /sys/class/scsi_host/host0/active_mode
Initiator

The default worked, because not setting the field has it initialized to zero
== MODE_UNKNOWN. scsi_host_alloc() sets shost->active_mode = MODE_INITIATOR
in this case. The sysfs accessor function show_shost_supported_mode()
assumes MODE_INITIATOR in this case.  This default behavior was introduced
with v2.6.24 commit 7a39ac3f25be ("[SCSI] make supported_mode default to
initiator.").  The feature flag was introduced with v2.6.24 commit
5dc2b89e1242 ("[SCSI] add supported_mode and active_mode attributes to the
host").  So there was no release where zfcp would have shown "unknown".

Signed-off-by: Steffen Maier <maier@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/s390/scsi/zfcp_scsi.c