Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-05-23 19:05:56 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-05-23 19:05:56 +0200
commitfbf32ade743761f6fbeb4c81da24ee03beff8c90 (patch)
treee3c1893c7c7679121fcec62ffdd7d0bcd6ff6074
parentd18ce40071d3622c5616c0e5316ce8caafc8ba76 (diff)
s390/qdio: clear intparm during shutdown (bsc#1134597
LTC#177516).
-rw-r--r--patches.arch/s390-qdio-clear-intparm-during-shutdown44
-rw-r--r--series.conf1
2 files changed, 45 insertions, 0 deletions
diff --git a/patches.arch/s390-qdio-clear-intparm-during-shutdown b/patches.arch/s390-qdio-clear-intparm-during-shutdown
new file mode 100644
index 0000000000..90ed02ec15
--- /dev/null
+++ b/patches.arch/s390-qdio-clear-intparm-during-shutdown
@@ -0,0 +1,44 @@
+From: Julian Wiedmann <jwi@linux.vnet.ibm.com>
+Date: Wed, 21 Mar 2018 17:14:00 +0100
+Subject: s390/qdio: clear intparm during shutdown
+Git-commit: 89286320a236d245834075fa13adb0bdd827ecaa
+Patch-mainline: v4.17-rc1
+References: bsc#1134597 LTC#177516
+
+During shutdown, qdio returns its ccw device back to control by the
+upper-layer driver. But there is a remote chance that by the time where the
+IRQ handler gets switched back, the interrupt for the preceding
+ccw_device_{clear,halt} hasn't been presented yet.
+Upper-layer drivers would then need to handle this IRQ - and since the IO
+is issued with an intparm, it could very well be confused with whatever
+intparm mechanism the driver uses itself (eg intparm == request address).
+
+So when switching over the IRQ handler, also clear the intparm and have
+upper-layer drivers deal with any such delayed interrupt as if it was
+unsolicited.
+
+Suggested-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
+Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ drivers/s390/cio/qdio_main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
+index a337281337a7..f4ca72dd862f 100644
+--- a/drivers/s390/cio/qdio_main.c
++++ b/drivers/s390/cio/qdio_main.c
+@@ -1207,8 +1207,10 @@ int qdio_shutdown(struct ccw_device *cdev, int how)
+ qdio_shutdown_thinint(irq_ptr);
+
+ /* restore interrupt handler */
+- if ((void *)cdev->handler == (void *)qdio_int_handler)
++ if ((void *)cdev->handler == (void *)qdio_int_handler) {
+ cdev->handler = irq_ptr->orig_handler;
++ cdev->private->intparm = 0;
++ }
+ spin_unlock_irq(get_ccwdev_lock(cdev));
+
+ qdio_set_state(irq_ptr, QDIO_IRQ_STATE_INACTIVE);
+
diff --git a/series.conf b/series.conf
index 08b2dd96f4..ad11e34718 100644
--- a/series.conf
+++ b/series.conf
@@ -15607,6 +15607,7 @@
patches.drm/drm-amdgpu-Fix-PCIe-lane-width-calculation
patches.drm/drm-radeon-add-PX-quirk-for-Asus-K73TK
patches.arch/s390-crypto-Adjust-s390-aes-and-paes-cipher-prioriti.patch
+ patches.arch/s390-qdio-clear-intparm-during-shutdown
patches.arch/s390-ipl-ensure-loadparm-valid-flag-is-set.patch
patches.arch/s390-correct-nospec-auto-detection-init-order.patch
patches.drivers/i2c-i801-Save-register-SMBSLVCMD-value-only-once