linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: "'Mathias Nyman'" <mathias.nyman@linux.intel.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver
Date: Thu, 2 Nov 2017 09:17:20 +0100	[thread overview]
Message-ID: <20171102081720.GA3298@kroah.com> (raw)
In-Reply-To: <59FA76AA.4060602@linux.intel.com>

On Thu, Nov 02, 2017 at 09:36:42AM +0800, Lu Baolu wrote:
> Hi Greg,
> 
> On 09/05/2017 09:58 AM, Lu Baolu wrote:
> > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers)
> > can be implemented with the Debug Capability(DbC). It presents a debug
> > device which is fully compliant with the USB framework and provides the
> > equivalent of a very high performance full-duplex serial link. The debug
> > capability operation model and registers interface are defined in 7.6.8
> > of the xHCI specification, revision 1.1.
> >
> > The DbC debug device shares a root port with the xHCI host. By default,
> > the debug capability is disabled and the root port is assigned to xHCI.
> > When the DbC is enabled, the root port will be assigned to the DbC debug
> > device, and the xHCI sees nothing on this port. This implementation uses
> > a sysfs node named <dbc> under the xHCI device to manage the enabling
> > and disabling of the debug capability.
> >
> > When the debug capability is enabled, it will present a debug device
> > through the debug port. This debug device is fully compliant with the
> > USB3 framework, and it can be enumerated by a debug host on the other
> > end of the USB link. As soon as the debug device is configured, a TTY
> > serial device named /dev/ttyDBC0 will be created.
> >
> > One use of this link is running a login service on the debug target.
> > Hence it can be remote accessed by a debug host. Another use case can
> > probably be found in servers. It provides a peer-to-peer USB link
> > between two host-only machines. This provides a reasonable out-of-band
> > communication method between two servers.
> >
> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> > ---
> >  .../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd     |   25 +
> >  drivers/usb/host/Kconfig                           |    9 +
> >  drivers/usb/host/Makefile                          |    5 +
> >  drivers/usb/host/xhci-dbgcap.c                     | 1016 ++++++++++++++++++++
> >  drivers/usb/host/xhci-dbgcap.h                     |  247 +++++
> >  drivers/usb/host/xhci-dbgtty.c                     |  586 +++++++++++
> >  drivers/usb/host/xhci-trace.h                      |   60 ++
> >  drivers/usb/host/xhci.c                            |   10 +
> >  drivers/usb/host/xhci.h                            |    1 +
> >  9 files changed, 1959 insertions(+)
> >  create mode 100644 Documentation/ABI/testing/sysfs-bus-pci-drivers-xhci_hcd
> >  create mode 100644 drivers/usb/host/xhci-dbgcap.c
> >  create mode 100644 drivers/usb/host/xhci-dbgcap.h
> >  create mode 100644 drivers/usb/host/xhci-dbgtty.c
> >
> 
> [snip]
> 
> > +#define DBC_VENDOR_ID			0x1d6b	/* Linux Foundation 0x1d6b */
> > +#define DBC_PRODUCT_ID			0x0004	/* device 0004 */
> >
> 
> The DbC (xHCI DeBug Capability) is an optional functionality in
> some xHCI host controllers. It will present a super-speed debug
> device through the debug port after it is enabled.
> 
> The DbC register set defines an interface for system software
> to specify the vendor id and product id of the debug device.
> These two values will be presented by the debug device in its
> device descriptor idVendor and idProduct fields.
> 
> Microsoft Windows have a well established protocol for
> debugging over DbC. And it assigns below values for its use.
> 
> USB\VID_045E&PID_062D.DeviceDesc="Microsoft USB Debug Target"
> 
> I'm going to use 0x1d6b/0x0004 value pair for DbC use in
> Linux. Do you approve me to do so?

No.  Why can't you use the same ids as Windows?  This is implementing
the same protocol, right?

If you have to use a OS-specific id, I can give you a new one, but 0004
is not ok to use for this.

thanks,

greg k-h

  reply	other threads:[~2017-11-02  8:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05  1:58 [PATCH v3 0/3] usb: xhci: Add debug capability support in xhci Lu Baolu
2017-09-05  1:58 ` [PATCH v3 1/3] usb: xhci: Make some static functions global Lu Baolu
2017-09-05  1:58 ` [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver Lu Baolu
2017-10-24 17:03   ` Mathias Nyman
2017-10-25  2:15     ` Lu Baolu
2017-11-02  1:36   ` Lu Baolu
2017-11-02  8:17     ` Greg Kroah-Hartman [this message]
2017-11-02  9:15       ` Felipe Balbi
2017-11-02  9:32         ` Greg Kroah-Hartman
2017-11-02 10:38           ` Felipe Balbi
2017-11-02 16:51             ` Greg Kroah-Hartman
2017-11-03  0:45               ` Lu Baolu
2017-11-03  6:27                 ` Greg Kroah-Hartman
2017-11-03 10:52                   ` Felipe Balbi
2017-11-06  0:35                   ` Lu Baolu
2017-11-06  8:00                     ` Greg Kroah-Hartman
2017-11-07  2:32                       ` Lu Baolu
2017-11-13 15:26   ` Mathias Nyman
2017-11-14  7:28     ` Felipe Balbi
2017-11-15  7:25       ` Lu Baolu
2017-09-05  1:59 ` [PATCH v3 3/3] usb: doc: Update document for USB3 debug port usage Lu Baolu

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=20171102081720.GA3298@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).