Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-12 22:18:26 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-12 22:21:32 +0100
commit8fee063b3e0d0446f3d856b3fd1484500fef8a65 (patch)
tree3c8feb97f53ffa66f7bcadb4a215aefe569b9864
parent04d407887ba95f81550acfdb90e5982ce5a50f1d (diff)
serial: 8250_pci: Make PCI class test non fatal (bnc#1012628).
-rw-r--r--patches.kernel.org/4.20.8-340-serial-8250_pci-Make-PCI-class-test-non-fatal.patch63
-rw-r--r--series.conf1
2 files changed, 64 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.8-340-serial-8250_pci-Make-PCI-class-test-non-fatal.patch b/patches.kernel.org/4.20.8-340-serial-8250_pci-Make-PCI-class-test-non-fatal.patch
new file mode 100644
index 0000000000..85c4738f6f
--- /dev/null
+++ b/patches.kernel.org/4.20.8-340-serial-8250_pci-Make-PCI-class-test-non-fatal.patch
@@ -0,0 +1,63 @@
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Thu, 24 Jan 2019 23:51:21 +0200
+Subject: [PATCH] serial: 8250_pci: Make PCI class test non fatal
+References: bnc#1012628
+Patch-mainline: 4.20.8
+Git-commit: 824d17c57b0abbcb9128fb3f7327fae14761914b
+
+commit 824d17c57b0abbcb9128fb3f7327fae14761914b upstream.
+
+As has been reported the National Instruments serial cards have broken
+PCI class.
+
+The commit 7d8905d06405
+
+ ("serial: 8250_pci: Enable device after we check black list")
+
+made the PCI class check mandatory for the case when device is listed in
+a quirk list.
+
+Make PCI class test non fatal to allow broken card be enumerated.
+
+Fixes: 7d8905d06405 ("serial: 8250_pci: Enable device after we check black list")
+Cc: stable <stable@vger.kernel.org>
+Reported-by: Guan Yung Tseng <guan.yung.tseng@ni.com>
+Tested-by: Guan Yung Tseng <guan.yung.tseng@ni.com>
+Tested-by: KHUENY.Gerhard <Gerhard.KHUENY@bachmann.info>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/tty/serial/8250/8250_pci.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
+index f80a300b5d68..48bd694a5fa1 100644
+--- a/drivers/tty/serial/8250/8250_pci.c
++++ b/drivers/tty/serial/8250/8250_pci.c
+@@ -3420,6 +3420,11 @@ static int
+ serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
+ {
+ int num_iomem, num_port, first_port = -1, i;
++ int rc;
++
++ rc = serial_pci_is_class_communication(dev);
++ if (rc)
++ return rc;
+
+ /*
+ * Should we try to make guesses for multiport serial devices later?
+@@ -3647,10 +3652,6 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
+
+ board = &pci_boards[ent->driver_data];
+
+- rc = serial_pci_is_class_communication(dev);
+- if (rc)
+- return rc;
+-
+ rc = serial_pci_is_blacklisted(dev);
+ if (rc)
+ return rc;
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index ce92e6b8dc..02327c6823 100644
--- a/series.conf
+++ b/series.conf
@@ -1076,6 +1076,7 @@
patches.kernel.org/4.20.8-337-perf-core-Don-t-WARN-for-impossible-ring-buffe.patch
patches.kernel.org/4.20.8-338-perf-tests-evsel-tp-sched-Fix-bitwise-operator.patch
patches.kernel.org/4.20.8-339-serial-fix-race-between-flush_to_ldisc-and-tty.patch
+ patches.kernel.org/4.20.8-340-serial-8250_pci-Make-PCI-class-test-non-fatal.patch
########################################################
# Build fixes that apply to the vanilla kernel too.