From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Frédéric Brière" <fbriere@fbriere.net>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-parport@lists.infradead.org
Subject: Re: [PATCH] parport/serial: add support for Timedia/SUNIX cards to parport_serial
Date: Thu, 8 Jul 2010 12:11:22 +0100 [thread overview]
Message-ID: <20100708121122.17d3e823@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1277511823-6973-1-git-send-email-fbriere@fbriere.net>
On Fri, 25 Jun 2010 20:23:43 -0400
Frédéric Brière <fbriere@fbriere.net> 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
next prev parent reply other threads:[~2010-07-08 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 0:23 Frédéric Brière
2010-07-08 11:11 ` Alan Cox [this message]
2010-07-12 15:44 ` Frédéric Brière
2010-07-12 15:49 ` [PATCH 1/2] serial: 8250_pci: add .probe member to struct pci_serial_quirk Frédéric Brière
2010-07-12 15:49 ` [PATCH 2/2] parport/serial: add support for Timedia/SUNIX cards to parport_serial Frédéric Brière
2010-07-12 16:56 ` [PATCH] " Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100708121122.17d3e823@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=fbriere@fbriere.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parport@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®