Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] Perle multimodem card (PCI-RAS) detection

Get the Perle quad-modem PCI card (PCI-RAS4) detected by serial driver. It
may also get the PCI-RAS8 running, but can't guarantee as I didn't had one for
testing.

Signed-off-by: Thomas Hoehn <thomas.hoehn@avocent.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Thomas Hoehn and committed by
Linus Torvalds
48212008 a21217da

+27 -2
+6 -2
drivers/serial/8250.c
··· 920 920 #ifdef __i386__ 921 921 outb(0xff, 0x080); 922 922 #endif 923 - scratch2 = serial_inp(up, UART_IER); 923 + /* 924 + * Mask out IER[7:4] bits for test as some UARTs (e.g. TL 925 + * 16C754B) allow only to modify them if an EFR bit is set. 926 + */ 927 + scratch2 = serial_inp(up, UART_IER) & 0x0f; 924 928 serial_outp(up, UART_IER, 0x0F); 925 929 #ifdef __i386__ 926 930 outb(0, 0x080); 927 931 #endif 928 - scratch3 = serial_inp(up, UART_IER); 932 + scratch3 = serial_inp(up, UART_IER) & 0x0f; 929 933 serial_outp(up, UART_IER, scratch); 930 934 if (scratch2 != 0 || scratch3 != 0x0F) { 931 935 /*
+16
drivers/serial/8250_pci.c
··· 679 679 */ 680 680 { 681 681 .vendor = PCI_VENDOR_ID_PLX, 682 + .device = PCI_DEVICE_ID_PLX_9030, 683 + .subvendor = PCI_SUBVENDOR_ID_PERLE, 684 + .subdevice = PCI_ANY_ID, 685 + .setup = pci_default_setup, 686 + }, 687 + { 688 + .vendor = PCI_VENDOR_ID_PLX, 682 689 .device = PCI_DEVICE_ID_PLX_9050, 683 690 .subvendor = PCI_SUBVENDOR_ID_EXSYS, 684 691 .subdevice = PCI_SUBDEVICE_ID_EXSYS_4055, ··· 2385 2378 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ 2386 2379 pbn_b2_2_115200 }, 2387 2380 2381 + /* 2382 + * Perle PCI-RAS cards 2383 + */ 2384 + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, 2385 + PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4, 2386 + 0, 0, pbn_b2_4_921600 }, 2387 + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030, 2388 + PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8, 2389 + 0, 0, pbn_b2_8_921600 }, 2388 2390 /* 2389 2391 * These entries match devices with class COMMUNICATION_SERIAL, 2390 2392 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
+5
include/linux/pci_ids.h
··· 959 959 #define PCI_DEVICE_ID_PLX_R753 0x1152 960 960 #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 961 961 #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 962 + #define PCI_DEVICE_ID_PLX_9030 0x9030 962 963 #define PCI_DEVICE_ID_PLX_9050 0x9050 963 964 #define PCI_DEVICE_ID_PLX_9080 0x9080 964 965 #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 ··· 1994 1993 #define PCI_DEVICE_ID_ENE_722 0x1422 1995 1994 1996 1995 #define PCI_VENDOR_ID_CHELSIO 0x1425 1996 + 1997 + #define PCI_SUBVENDOR_ID_PERLE 0x155f 1998 + #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 1999 + #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 1997 2000 1998 2001 1999 2002 #define PCI_VENDOR_ID_SYBA 0x1592