Re: [PATCH] parport/serial: add support for Timedia/SUNIX cards to parport_serial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Jun 2010 20:23:43 -0400
Frédéric Brière <fbriere@xxxxxxxxxxx> wrote:

> 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 seems to have fallen on silence so I'm getting around to looking at
it.  I'm not sure the sunix hack to avoid lots of entries is a good idea
- it'll eventually break horribly somewhere.


> + * Devices with a parallel port can be identified by their subdevice ID
> + * matching xx[7-9]x.  We thus mark them as class OTHER, so that they will be
> + * ignored by 8250_pci, and claimed by parport_serial instead.
> + */
> +static void __devinit quirk_timedia(struct pci_dev *dev)
> +{
> +	/* 0,2,3,5,6: serial only -- 7,8,9: serial + parallel */
> +	if ((dev->subsystem_device & 0x00f0) >= 0x70) {
> +		dev_info(&dev->dev, "Timedia %04x; "
> +			"changing class SERIAL to OTHER (use parport_serial)\n",
> +			dev->subsystem_device);
> +		dev->class = (PCI_CLASS_COMMUNICATION_OTHER << 8) |
> +		    (dev->class & 0xff);
> +	}
> +}
> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889,
> +		quirk_timedia);

And this check probably should be done in the serial driver so that it
doesn't bind, rather than changing the class, which then lies to other
bits of the kernel so can have funny side effects.

If you did that check in the serial driver and returned -ENODEV to the
probe the id will be handed on to the next driver that matches (ie
parport_serial)

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux