Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1605388

[PATCH v8 4/5] usb: serial: add dbc debug device support to usb_debug

From Lu Baolu <baolu.lu@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v8 4/5] usb: serial: add dbc debug device support to usb_debug
Date 2017-03-21 09:10 +0100
Message-ID <tnn1E-xY-11@gated-at.bofh.it> (permalink)
References <tnn1E-xY-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch adds dbc debug device support to the usb_debug driver.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Acked-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/usb_debug.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c
index ca2fa5b..92f7e5c 100644
--- a/drivers/usb/serial/usb_debug.c
+++ b/drivers/usb/serial/usb_debug.c
@@ -32,7 +32,18 @@ static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(0x0525, 0x127a) },
 	{ },
 };
-MODULE_DEVICE_TABLE(usb, id_table);
+
+static const struct usb_device_id dbc_id_table[] = {
+	{ USB_DEVICE(0x1d6b, 0x0004) },
+	{ },
+};
+
+static const struct usb_device_id id_table_combined[] = {
+	{ USB_DEVICE(0x0525, 0x127a) },
+	{ USB_DEVICE(0x1d6b, 0x0004) },
+	{ },
+};
+MODULE_DEVICE_TABLE(usb, id_table_combined);
 
 /* This HW really does not support a serial break, so one will be
  * emulated when ever the break state is set to true.
@@ -71,9 +82,20 @@ static struct usb_serial_driver debug_device = {
 	.process_read_urb =	usb_debug_process_read_urb,
 };
 
+static struct usb_serial_driver dbc_device = {
+	.driver = {
+		.owner =	THIS_MODULE,
+		.name =		"xhci_dbc",
+	},
+	.id_table =		dbc_id_table,
+	.num_ports =		1,
+	.break_ctl =		usb_debug_break_ctl,
+	.process_read_urb =	usb_debug_process_read_urb,
+};
+
 static struct usb_serial_driver * const serial_drivers[] = {
-	&debug_device, NULL
+	&debug_device, &dbc_device, NULL
 };
 
-module_usb_serial_driver(serial_drivers, id_table);
+module_usb_serial_driver(serial_drivers, id_table_combined);
 MODULE_LICENSE("GPL");
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 0/5] usb: early: add support for early printk through USB3 debug port Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
  [PATCH v8 4/5] usb: serial: add dbc debug device support to usb_debug Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
    [tip:x86/debug] usb/serial: Add DBC debug device support to  usb_debug tip-bot for Lu Baolu <tipbot@zytor.com> - 2017-03-21 13:30 +0100
  [PATCH v8 3/5] x86: add support for earlyprintk via USB3 debug port Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
    [tip:x86/debug] x86/earlyprintk: Add support for earlyprintk via  USB3 debug port tip-bot for Lu Baolu <tipbot@zytor.com> - 2017-03-21 13:30 +0100
  [PATCH v8 1/5] x86: add simple udelay calibration Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
    [tip:x86/debug] x86/timers: Add simple udelay calibration tip-bot for Lu Baolu <tipbot@zytor.com> - 2017-03-21 13:30 +0100
  [PATCH v8 5/5] usb: doc: add document for USB3 debug port usage Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
    [tip:x86/debug] usb/doc: Add document for USB3 debug port usage tip-bot for Lu Baolu <tipbot@zytor.com> - 2017-03-21 13:30 +0100
  [PATCH v8 2/5] usb: early: add driver for xhci debug capability Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-21 09:10 +0100
    [tip:x86/debug] usb/early: Add driver for xhci debug capability tip-bot for Lu Baolu <tipbot@zytor.com> - 2017-03-21 13:30 +0100
  Re: [PATCH v8 0/5] usb: early: add support for early printk through  USB3 debug port Ingo Molnar <mingo@kernel.org> - 2017-03-21 12:40 +0100
    Re: [PATCH v8 0/5] usb: early: add support for early printk through  USB3 debug port Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-03-21 13:40 +0100
      Re: [PATCH v8 0/5] usb: early: add support for early printk through  USB3 debug port Ingo Molnar <mingo@kernel.org> - 2017-03-21 13:50 +0100
    Re: [PATCH v8 0/5] usb: early: add support for early printk through  USB3 debug port Lu Baolu <baolu.lu@linux.intel.com> - 2017-03-22 03:30 +0100

csiph-web