Skip to content

Commit 95d6988

Browse files
glneogregkh
authored andcommitted
serial: 8250_exar: Add support for USR298x PCI Modems
Possibly the last PCI controller-based (i.e. not a soft/winmodem) dial-up modem one can still buy. Looks to have a stock XR17C154 PCI UART chip for communication, but for some reason when provisioning the PCI IDs they swapped the vendor and subvendor IDs. Otherwise this card would have worked out of the box. Searching online, some folks seem to not have this issue and others do, so it is possible only some batches of cards have this error. Create a new macro to handle the switched IDs and add support here. Signed-off-by: Andrew Davis <afd@ti.com> Cc: stable <stable@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230420160209.28221-1-afd@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ac9a786 commit 95d6988

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
#define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020
4141
#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
4242
#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
43+
4344
#define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358
4445
#define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358
4546

47+
#define PCI_SUBDEVICE_ID_USR_2980 0x0128
48+
#define PCI_SUBDEVICE_ID_USR_2981 0x0129
49+
4650
#define PCI_DEVICE_ID_SEALEVEL_710xC 0x1001
4751
#define PCI_DEVICE_ID_SEALEVEL_720xC 0x1002
4852
#define PCI_DEVICE_ID_SEALEVEL_740xC 0x1004
@@ -829,6 +833,15 @@ static const struct exar8250_board pbn_exar_XR17V8358 = {
829833
(kernel_ulong_t)&bd \
830834
}
831835

836+
#define USR_DEVICE(devid, sdevid, bd) { \
837+
PCI_DEVICE_SUB( \
838+
PCI_VENDOR_ID_USR, \
839+
PCI_DEVICE_ID_EXAR_##devid, \
840+
PCI_VENDOR_ID_EXAR, \
841+
PCI_SUBDEVICE_ID_USR_##sdevid), 0, 0, \
842+
(kernel_ulong_t)&bd \
843+
}
844+
832845
static const struct pci_device_id exar_pci_tbl[] = {
833846
EXAR_DEVICE(ACCESSIO, COM_2S, pbn_exar_XR17C15x),
834847
EXAR_DEVICE(ACCESSIO, COM_4S, pbn_exar_XR17C15x),
@@ -853,6 +866,10 @@ static const struct pci_device_id exar_pci_tbl[] = {
853866

854867
IBM_DEVICE(XR17C152, SATURN_SERIAL_ONE_PORT, pbn_exar_ibm_saturn),
855868

869+
/* USRobotics USR298x-OEM PCI Modems */
870+
USR_DEVICE(XR17C152, 2980, pbn_exar_XR17C15x),
871+
USR_DEVICE(XR17C152, 2981, pbn_exar_XR17C15x),
872+
856873
/* Exar Corp. XR17C15[248] Dual/Quad/Octal UART */
857874
EXAR_DEVICE(EXAR, XR17C152, pbn_exar_XR17C15x),
858875
EXAR_DEVICE(EXAR, XR17C154, pbn_exar_XR17C15x),

0 commit comments

Comments
 (0)