Skip to content

Commit 824d17c

Browse files
andy-shevgregkh
authored andcommitted
serial: 8250_pci: Make PCI class test non fatal
As has been reported the National Instruments serial cards have broken PCI class. The commit 7d8905d ("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: 7d8905d ("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>
1 parent 1575c08 commit 824d17c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/tty/serial/8250/8250_pci.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3420,6 +3420,11 @@ static int
34203420
serial_pci_guess_board(struct pci_dev *dev, struct pciserial_board *board)
34213421
{
34223422
int num_iomem, num_port, first_port = -1, i;
3423+
int rc;
3424+
3425+
rc = serial_pci_is_class_communication(dev);
3426+
if (rc)
3427+
return rc;
34233428

34243429
/*
34253430
* 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)
36473652

36483653
board = &pci_boards[ent->driver_data];
36493654

3650-
rc = serial_pci_is_class_communication(dev);
3651-
if (rc)
3652-
return rc;
3653-
36543655
rc = serial_pci_is_blacklisted(dev);
36553656
if (rc)
36563657
return rc;

0 commit comments

Comments
 (0)