diff options
author | Frédéric Brière <fbriere@fbriere.net> | 2011-05-29 15:08:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 12:35:57 -0400 |
commit | b9b24558f7d36c550b5cf0b550a8926f8c03cdbd (patch) | |
tree | 35bf3afc3ff13a8f09e1d45af7d25dd19ad2e53c /drivers/tty | |
parent | 5bf8f501e05930364b345ed8710c5b1a13207134 (diff) |
parport/serial: add support for Timedia/SUNIX cards to parport_serial
Timedia/SUNIX PCI cards with both serial and parallel ports are
currently supported by 8250_pci and parport_pc individually. Moving
that support into parport_serial allows using both types of ports at the
same time.
This was successfully tested with a SUNIX 4079T.
Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: linux-serial@vger.kernel.org
Cc: linux-parport@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250_pci.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 9b119fe9257f..e1d4668f86ae 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
@@ -575,6 +575,28 @@ static const struct timedia_struct { | |||
575 | { 8, timedia_eight_port } | 575 | { 8, timedia_eight_port } |
576 | }; | 576 | }; |
577 | 577 | ||
578 | /* | ||
579 | * There are nearly 70 different Timedia/SUNIX PCI serial devices. Instead of | ||
580 | * listing them individually, this driver merely grabs them all with | ||
581 | * PCI_ANY_ID. Some of these devices, however, also feature a parallel port, | ||
582 | * and should be left free to be claimed by parport_serial instead. | ||
583 | */ | ||
584 | static int pci_timedia_probe(struct pci_dev *dev) | ||
585 | { | ||
586 | /* | ||
587 | * Check the third digit of the subdevice ID | ||
588 | * (0,2,3,5,6: serial only -- 7,8,9: serial + parallel) | ||
589 | */ | ||
590 | if ((dev->subsystem_device & 0x00f0) >= 0x70) { | ||
591 | dev_info(&dev->dev, | ||
592 | "ignoring Timedia subdevice %04x for parport_serial\n", | ||
593 | dev->subsystem_device); | ||
594 | return -ENODEV; | ||
595 | } | ||
596 | |||
597 | return 0; | ||
598 | } | ||
599 | |||
578 | static int pci_timedia_init(struct pci_dev *dev) | 600 | static int pci_timedia_init(struct pci_dev *dev) |
579 | { | 601 | { |
580 | const unsigned short *ids; | 602 | const unsigned short *ids; |
@@ -1463,6 +1485,7 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
1463 | .device = PCI_DEVICE_ID_TIMEDIA_1889, | 1485 | .device = PCI_DEVICE_ID_TIMEDIA_1889, |
1464 | .subvendor = PCI_VENDOR_ID_TIMEDIA, | 1486 | .subvendor = PCI_VENDOR_ID_TIMEDIA, |
1465 | .subdevice = PCI_ANY_ID, | 1487 | .subdevice = PCI_ANY_ID, |
1488 | .probe = pci_timedia_probe, | ||
1466 | .init = pci_timedia_init, | 1489 | .init = pci_timedia_init, |
1467 | .setup = pci_timedia_setup, | 1490 | .setup = pci_timedia_setup, |
1468 | }, | 1491 | }, |