linux-stable/drivers/s390
Benjamin Block 971f2abb4c scsi: zfcp: Fence adapter status propagation for common statuses
Common status flags that all main objects - adapter, port, and unit -
support are propagated to sub-objects when set or cleared. For instance,
when setting the status ZFCP_STATUS_COMMON_ERP_INUSE for an adapter object,
we will propagate this to all its child ports and units - same for when
clearing a common status flag.

Units of an adapter object are enumerated via __shost_for_each_device()
over the scsi host object of the corresponding adapter.

Once we move the scsi host object allocation and registration to after the
first exchange config and exchange port data, this won't be possible for
cases where we set or clear common statuses during the very first adapter
recovery.

But since we won't have any port or unit objects yet at that point of time,
we can just fence the status propagation for cases where the scsi host
object is not yet set in the adapter object. It won't change any effective
status propagations, but will prevent us from dereferencing invalid
pointers.

For any later point in the work flow the scsi host object will be set and
thus nothing is changed then.

Link: https://lore.kernel.org/r/f51fe5f236a1e3d1ce53379c308777561bfe35e1.1588956679.git.bblock@linux.ibm.com
Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-05-11 23:19:50 -04:00
..
block libnvdimm for 5.7 2020-04-08 21:03:40 -07:00
char s390: use fallthrough; 2020-03-25 12:39:37 +01:00
cio s390/cio: generate delayed uevent for vfio-ccw subchannels 2020-04-06 14:02:28 +02:00
crypto s390 updates for the 5.7 merge window 2020-04-04 09:45:50 -07:00
net s390/qdio: remove cdev from init_data 2020-04-06 13:13:50 +02:00
scsi scsi: zfcp: Fence adapter status propagation for common statuses 2020-05-11 23:19:50 -04:00
virtio virtio/s390: fix race on airq_areas[] 2019-07-26 13:36:18 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00