scsi: zfcp: Move shost modification after QDIO (re-)open into fenced function
authorBenjamin Block <bblock@linux.ibm.com>
Fri, 8 May 2020 17:23:28 +0000 (19:23 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 12 May 2020 03:19:46 +0000 (23:19 -0400)
commit978857c7e367d6841f71c4ded5a8c244520f5e22
tree9fcc9cd420fd168044aa6920ea3bf132cf26f7cc
parentb59293b469b9e1bbdaf314123498b83a5a9e9ce9
scsi: zfcp: Move shost modification after QDIO (re-)open into fenced function

When establishing and activating the QDIO queue pair for a FCP device for
the first time, or after an adapter recovery, we publish some of its
characteristics to the scsi host object representing that FCP device.

When moving the scsi host object allocation and registration to after the
first exchange config and exchange port data, this is not possible for the
former case - QDIO open for the first time - because that happens before
exchange config and exchange port data.

Move the scsi host object update into a fenced function that checks whether
the object already exists or not. This way we can repeat that step later,
once we are past the allocation.

Once the first recovery succeeds we don't release the scsi host object
anymore, so further recoveries do work as before.

Link: https://lore.kernel.org/r/a214ebf508f71e3690113e3e90edab1cea0e24e3.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>
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_qdio.c