Skip to content

Commit 14ee78d

Browse files
11matt556gregkh
authored andcommitted
serial: exar: Add support for Sealevel 7xxxC serial cards
Add support for Sealevel 7xxxC serial cards. This patch: * Adds IDs to recognize 7xxxC cards from Sealevel Systems. * Updates exar_pci_probe() to set nr_ports to last two bytes of primary dev ID for these cards. Signed-off-by: Matthew Howell <matthew.howell@sealevel.com> Cc: stable <stable@kernel.org> Link: https://lore.kernel.org/r/alpine.DEB.2.21.2301191440010.22558@tstest-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2cbafff commit 14ee78d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/tty/serial/8250/8250_exar.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@
4343
#define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
4444
#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
4545

46+
#define PCI_DEVICE_ID_SEALEVEL_710xC 0x1001
47+
#define PCI_DEVICE_ID_SEALEVEL_720xC 0x1002
48+
#define PCI_DEVICE_ID_SEALEVEL_740xC 0x1004
49+
#define PCI_DEVICE_ID_SEALEVEL_780xC 0x1008
50+
#define PCI_DEVICE_ID_SEALEVEL_716xC 0x1010
51+
4652
#define UART_EXAR_INT0 0x80
4753
#define UART_EXAR_8XMODE 0x88 /* 8X sampling rate select */
4854
#define UART_EXAR_SLEEP 0x8b /* Sleep mode */
@@ -638,6 +644,8 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
638644
nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1);
639645
else if (board->num_ports)
640646
nr_ports = board->num_ports;
647+
else if (pcidev->vendor == PCI_VENDOR_ID_SEALEVEL)
648+
nr_ports = pcidev->device & 0xff;
641649
else
642650
nr_ports = pcidev->device & 0x0f;
643651

@@ -864,6 +872,12 @@ static const struct pci_device_id exar_pci_tbl[] = {
864872
EXAR_DEVICE(COMMTECH, 4224PCI335, pbn_fastcom335_4),
865873
EXAR_DEVICE(COMMTECH, 2324PCI335, pbn_fastcom335_4),
866874
EXAR_DEVICE(COMMTECH, 2328PCI335, pbn_fastcom335_8),
875+
876+
EXAR_DEVICE(SEALEVEL, 710xC, pbn_exar_XR17V35x),
877+
EXAR_DEVICE(SEALEVEL, 720xC, pbn_exar_XR17V35x),
878+
EXAR_DEVICE(SEALEVEL, 740xC, pbn_exar_XR17V35x),
879+
EXAR_DEVICE(SEALEVEL, 780xC, pbn_exar_XR17V35x),
880+
EXAR_DEVICE(SEALEVEL, 716xC, pbn_exar_XR17V35x),
867881
{ 0, }
868882
};
869883
MODULE_DEVICE_TABLE(pci, exar_pci_tbl);

0 commit comments

Comments
 (0)