Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=482120084d843d4cbb7ff3eb84510a1471130ce0
Commit:     482120084d843d4cbb7ff3eb84510a1471130ce0
Parent:     a21217daae8ce6e841e33d4a2bb24026723cb21d
Author:     Thomas Hoehn <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:46:05 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:33 2007 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: Russell King <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/8250.c     |    8 ++++++--
 drivers/serial/8250_pci.c |   16 ++++++++++++++++
 include/linux/pci_ids.h   |    5 +++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 5261f0a..2964ca9 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -920,12 +920,16 @@ static void autoconfig(struct uart_8250_port *up, 
unsigned int probeflags)
 #ifdef __i386__
                outb(0xff, 0x080);
 #endif
-               scratch2 = serial_inp(up, UART_IER);
+               /*
+                * Mask out IER[7:4] bits for test as some UARTs (e.g. TL
+                * 16C754B) allow only to modify them if an EFR bit is set.
+                */
+               scratch2 = serial_inp(up, UART_IER) & 0x0f;
                serial_outp(up, UART_IER, 0x0F);
 #ifdef __i386__
                outb(0, 0x080);
 #endif
-               scratch3 = serial_inp(up, UART_IER);
+               scratch3 = serial_inp(up, UART_IER) & 0x0f;
                serial_outp(up, UART_IER, scratch);
                if (scratch2 != 0 || scratch3 != 0x0F) {
                        /*
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 52e2e64..5dfaa09 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -679,6 +679,13 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
         */
        {
                .vendor         = PCI_VENDOR_ID_PLX,
+               .device         = PCI_DEVICE_ID_PLX_9030,
+               .subvendor      = PCI_SUBVENDOR_ID_PERLE,
+               .subdevice      = PCI_ANY_ID,
+               .setup          = pci_default_setup,
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_PLX,
                .device         = PCI_DEVICE_ID_PLX_9050,
                .subvendor      = PCI_SUBVENDOR_ID_EXSYS,
                .subdevice      = PCI_SUBDEVICE_ID_EXSYS_4055,
@@ -2379,6 +2386,15 @@ static struct pci_device_id serial_pci_tbl[] = {
                pbn_b2_2_115200 },
 
        /*
+        * Perle PCI-RAS cards
+        */
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+               PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS4,
+               0, 0, pbn_b2_4_921600 },
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9030,
+               PCI_SUBVENDOR_ID_PERLE, PCI_SUBDEVICE_ID_PCI_RAS8,
+               0, 0, pbn_b2_8_921600 },
+       /*
         * These entries match devices with class COMMUNICATION_SERIAL,
         * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
         */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index e5e5b9f..d655378 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -959,6 +959,7 @@
 #define PCI_DEVICE_ID_PLX_R753         0x1152
 #define PCI_DEVICE_ID_PLX_OLITEC       0x1187
 #define PCI_DEVICE_ID_PLX_PCI200SYN    0x3196
+#define PCI_DEVICE_ID_PLX_9030          0x9030
 #define PCI_DEVICE_ID_PLX_9050         0x9050
 #define PCI_DEVICE_ID_PLX_9080         0x9080
 #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
@@ -1994,6 +1995,10 @@
 
 #define PCI_VENDOR_ID_CHELSIO          0x1425
 
+#define PCI_SUBVENDOR_ID_PERLE          0x155f
+#define PCI_SUBDEVICE_ID_PCI_RAS4       0xf001
+#define PCI_SUBDEVICE_ID_PCI_RAS8       0xf010
+
 
 #define PCI_VENDOR_ID_SYBA             0x1592
 #define PCI_DEVICE_ID_SYBA_2P_EPP      0x0782
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to