From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [PATCH] 8250_pci: Prevent Exar/RTD Boards from binding.
Date: Fri, 25 Sep 2015 10:18:51 -0700 [thread overview]
Message-ID: <20150925171851.GA548@kroah.com> (raw)
In-Reply-To: <20150925154629.GA2603@kernel-dev>
On Fri, Sep 25, 2015 at 11:46:29AM -0400, Rob Groner wrote:
> Serial boards made by RTD using the Exar XR17V358 chip
> rely on the extra capabilities of the Exar-provided driver
> to allow configuration of the board. When support for
> the Exar chip was added to the kernel 8250_pci driver, this
> then prevented easy use of the board by customers for anything
> other than standard serial usage in RS232 mode.
>
> This patch prevents RTD sub-vendor boards from being bound
> by the 8250_pci driver, if it uses the XR17V358 chip. Other
> RTD boards using Exar chips are not affected.
>
> Signed-off-by Rob Groner <rgroner@rtd.com>
> ---
> drivers/tty/serial/8250/8250_pci.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> index 68042dd..89baf7f 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -359,6 +359,16 @@ static void pci_ni8430_exit(struct pci_dev *dev)
> iounmap(p);
> }
>
> +/*
> + * RTD Embedded Technologies, Inc. boards
> + * Prevent from being bound to 8250 driver
> + */
> +static int
> +pci_xr17v35x_rtd_probe(struct pci_dev *dev)
> +{
> + return -ENODEV;
> +}
> +
> /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */
> static int
> sbs_setup(struct serial_private *priv, const struct pciserial_board *board,
> @@ -2105,6 +2115,8 @@ pci_wch_ch38x_setup(struct serial_private *priv,
> #define PCI_DEVICE_ID_PERICOM_PI7C9X7954 0x7954
> #define PCI_DEVICE_ID_PERICOM_PI7C9X7958 0x7958
>
> +#define PCI_SUBVENDOR_ID_RTD 0x1435
> +
> /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
> #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
> #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
> @@ -2608,6 +2620,14 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
> {
> .vendor = PCI_VENDOR_ID_EXAR,
> .device = PCI_DEVICE_ID_EXAR_XR17V358,
> + .subvendor = PCI_SUBVENDOR_ID_RTD,
> + .subdevice = PCI_ANY_ID,
> + .probe = pci_xr17v35x_rtd_probe,
> + .setup = pci_xr17v35x_setup,
Why do you need the .setup callback if you are just not wanting to bind
to this driver?
thanks,
greg k-h
next prev parent reply other threads:[~2015-09-25 17:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 15:46 [PATCH] 8250_pci: Prevent Exar/RTD Boards from binding Rob Groner
2015-09-25 16:47 ` Valdis.Kletnieks at vt.edu
2015-09-25 17:37 ` Rob Groner
2015-09-25 18:37 ` Greg KH
2015-09-25 19:08 ` Rob Groner
2015-09-25 19:14 ` Greg KH
2015-09-25 19:21 ` Rob Groner
2015-09-26 0:45 ` Greg KH
2015-09-28 12:53 ` Rob Groner
2015-09-28 14:11 ` Greg KH
2015-09-28 15:33 ` Rob Groner
2015-10-26 12:28 ` Rob Groner
2015-11-11 15:46 ` Rob Groner
2015-11-11 17:32 ` Greg KH
2015-11-11 18:15 ` Rob Groner
2015-11-11 18:20 ` Sudip Mukherjee
2015-11-11 21:41 ` Greg KH
2015-11-11 21:49 ` Rob Groner
2015-11-11 22:13 ` Greg KH
2015-11-12 13:28 ` Rob Groner
2015-09-25 17:18 ` Greg KH [this message]
2015-09-25 17:30 ` Rob Groner
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=20150925171851.GA548@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.