Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-06-24 09:36:42 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-06-24 09:37:01 +0200
commitaa44395d59307dcd955d85459140eabcdd662f9a (patch)
tree496e459a0eb4c49d2ea33f444049b01f26bc0d17
parentc46f194618c1dfc349c24c96386161d4946c2410 (diff)
scsi: zfcp: fix rport unblock if deleted SCSI devices on
Scsi_Host (bsc#1051510).
-rw-r--r--patches.fixes/scsi-zfcp-fix-rport-unblock-if-deleted-scsi-devices-on-scsi_host80
-rw-r--r--series.conf1
2 files changed, 81 insertions, 0 deletions
diff --git a/patches.fixes/scsi-zfcp-fix-rport-unblock-if-deleted-scsi-devices-on-scsi_host b/patches.fixes/scsi-zfcp-fix-rport-unblock-if-deleted-scsi-devices-on-scsi_host
new file mode 100644
index 0000000000..4df9fc3f92
--- /dev/null
+++ b/patches.fixes/scsi-zfcp-fix-rport-unblock-if-deleted-scsi-devices-on-scsi_host
@@ -0,0 +1,80 @@
+From: Steffen Maier <maier@linux.ibm.com>
+Date: Tue, 26 Mar 2019 14:36:58 +0100
+Subject: scsi: zfcp: fix rport unblock if deleted SCSI devices on Scsi_Host
+Git-commit: fe67888fc007a76b81e37da23ce5bd8fb95890b0
+Patch-mainline: v5.1-rc3
+References: bsc#1051510
+
+An already deleted SCSI device can exist on the Scsi_Host and remain there
+because something still holds a reference. A new SCSI device with the same
+H:C:T:L and FCP device, target port WWPN, and FCP LUN can be created. When
+we try to unblock an rport, we still find the deleted SCSI device and
+return early because the zfcp_scsi_dev of that SCSI device is not
+ZFCP_STATUS_COMMON_UNBLOCKED. Hence we miss to unblock the rport, even if
+the new proper SCSI device would be in good state.
+
+Therefore, skip deleted SCSI devices when iterating the sdevs of the shost.
+[cf. __scsi_device_lookup{_by_target}() or scsi_device_get()]
+
+The following abbreviated trace sequence can indicate such problem:
+
+Area : REC
+Tag : ersfs_3
+LUN : 0x4045400300000000
+WWPN : 0x50050763031bd327
+LUN status : 0x40000000 not ZFCP_STATUS_COMMON_UNBLOCKED
+Ready count : n not incremented yet
+Running count : 0x00000000
+ERP want : 0x01
+ERP need : 0xc1 ZFCP_ERP_ACTION_NONE
+
+Area : REC
+Tag : ersfs_3
+LUN : 0x4045400300000000
+WWPN : 0x50050763031bd327
+LUN status : 0x41000000
+Ready count : n+1
+Running count : 0x00000000
+ERP want : 0x01
+ERP need : 0x01
+
+...
+
+Area : REC
+Level : 4 only with increased trace level
+Tag : ertru_l
+LUN : 0x4045400300000000
+WWPN : 0x50050763031bd327
+LUN status : 0x40000000
+Request ID : 0x0000000000000000
+ERP status : 0x01800000
+ERP step : 0x1000
+ERP action : 0x01
+ERP count : 0x00
+
+NOT followed by a trace record with tag "scpaddy"
+for WWPN 0x50050763031bd327.
+
+Signed-off-by: Steffen Maier <maier@linux.ibm.com>
+Fixes: 6f2ce1c6af37 ("scsi: zfcp: fix rport unblock race with LUN recovery")
+Cc: <stable@vger.kernel.org> #2.6.32+
+Reviewed-by: Jens Remus <jremus@linux.ibm.com>
+Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ drivers/s390/scsi/zfcp_erp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/s390/scsi/zfcp_erp.c
++++ b/drivers/s390/scsi/zfcp_erp.c
+@@ -1306,6 +1306,9 @@ static void zfcp_erp_try_rport_unblock(s
+ struct zfcp_scsi_dev *zsdev = sdev_to_zfcp(sdev);
+ int lun_status;
+
++ if (sdev->sdev_state == SDEV_DEL ||
++ sdev->sdev_state == SDEV_CANCEL)
++ continue;
+ if (zsdev->port != port)
+ continue;
+ /* LUN under port of interest */
diff --git a/series.conf b/series.conf
index 5931a6a2dc..7fe8ca9b52 100644
--- a/series.conf
+++ b/series.conf
@@ -21927,6 +21927,7 @@
patches.drivers/ALSA-pcm-Fix-possible-OOB-access-in-PCM-oss-plugins.patch
patches.drivers/ALSA-pcm-Don-t-suspend-stream-in-unrecoverable-PCM-s.patch
patches.drivers/i2c-i801-Add-support-for-Intel-Comet-Lake.patch
+ patches.fixes/scsi-zfcp-fix-rport-unblock-if-deleted-scsi-devices-on-scsi_host
patches.drivers/iommu-don-t-print-warning-when-iommu-driver-only-supports-unmanaged-domains
patches.drivers/iommu-amd-reserve-exclusion-range-in-iova-domain
patches.fixes/mm-Fix-modifying-of-page-protection-by-insert_pfn.patch