serial: 8250_pci: Make PCI class test non fatal

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

The commit 7d8905d064

  ("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: 7d8905d064 ("serial: 8250_pci: Enable device after we check black list")
Cc: stable <[email protected]>
Reported-by: Guan Yung Tseng <[email protected]>
Tested-by: Guan Yung Tseng <[email protected]>
Tested-by: KHUENY.Gerhard <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Andy Shevchenko 2019-01-24 23:51:21 +02:00 • committed by Greg Kroah-Hartman
commit 824d17c57b

View file

@ -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;