kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 8250_pci: Prevent Exar/RTD Boards from binding.
@ 2015-09-25 15:46 Rob Groner
  2015-09-25 16:47 ` Valdis.Kletnieks at vt.edu
  2015-09-25 17:18 ` Greg KH
  0 siblings, 2 replies; 22+ messages in thread
From: Rob Groner @ 2015-09-25 15:46 UTC (permalink / raw)
  To: kernelnewbies

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,
+	},
+	{
+		.vendor = PCI_VENDOR_ID_EXAR,
+		.device = PCI_DEVICE_ID_EXAR_XR17V358,
 		.subvendor	= PCI_ANY_ID,
 		.subdevice	= PCI_ANY_ID,
 		.setup		= pci_xr17v35x_setup,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2015-11-12 13:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-09-25 17:30   ` Rob Groner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).