提交 57a3ef4d 编写于 作者: A Andy Shevchenko 提交者: Greg Kroah-Hartman

serial: 8250_pci: Make PCI class test non fatal

commit 824d17c57b0abbcb9128fb3f7327fae14761914b upstream.

As has been reported the National Instruments serial cards have broken
PCI class.

The commit 7d8905d0

  ("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: 7d8905d0 ("serial: 8250_pci: Enable device after we check black list")
Cc: stable <stable@vger.kernel.org>
Reported-by: NGuan Yung Tseng <guan.yung.tseng@ni.com>
Tested-by: NGuan Yung Tseng <guan.yung.tseng@ni.com>
Tested-by: NKHUENY.Gerhard <Gerhard.KHUENY@bachmann.info>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f50a8b34
...@@ -3420,6 +3420,11 @@ static int ...@@ -3420,6 +3420,11 @@ static int
serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board) serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
{ {
int num_iomem, num_port, first_port = -1, i; 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? * 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) ...@@ -3647,10 +3652,6 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent)
board = &pci_boards[ent->driver_data]; board = &pci_boards[ent->driver_data];
rc = serial_pci_is_class_communication(dev);
if (rc)
return rc;
rc = serial_pci_is_blacklisted(dev); rc = serial_pci_is_blacklisted(dev);
if (rc) if (rc)
return rc; return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册