Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Lu Baolu
Hi Peter, On 10/20/2016 05:08 PM, Peter Zijlstra wrote: > On Thu, Oct 20, 2016 at 10:41:32AM +0200, Peter Zijlstra wrote: >> I'm already only using early_printk() because regular printk() is an >> unfixable piece of crap, and now you're making early_printk() useless >> too. > Note that the

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Peter Zijlstra
On Thu, Oct 20, 2016 at 10:41:32AM +0200, Peter Zijlstra wrote: > I'm already only using early_printk() because regular printk() is an > unfixable piece of crap, and now you're making early_printk() useless > too. Note that the existing USB debug port stuff doesn't seem to have a single lock in.

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Peter Zijlstra
On Thu, Oct 20, 2016 at 04:08:17PM +0800, Lu Baolu wrote: > Hi Peter, > > Thanks for your comments. > > On 10/19/2016 09:09 PM, Peter Zijlstra wrote: > > On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote: > >> +++ b/drivers/usb/early/xhci-dbc.c > >> +static int xdbc_bulk_write(const char

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Lu Baolu
Hi Peter, Thanks for your comments. On 10/19/2016 09:09 PM, Peter Zijlstra wrote: > On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote: >> +++ b/drivers/usb/early/xhci-dbc.c >> +static int xdbc_bulk_write(const char *bytes, int size) >> +{ >> +unsigned long flags; >> +int ret,

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-19 Thread Peter Zijlstra
On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote: > +++ b/drivers/usb/early/xhci-dbc.c > +static int xdbc_bulk_write(const char *bytes, int size) > +{ > + unsigned long flags; > + int ret, timeout = 0; > + > + spin_lock_irqsave(, flags); Yikes!! So how is this supposed to

[RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-18 Thread Lu Baolu
xHCI debug capability (DbC) is an optional but standalone functionality provided by an xHCI host controller. Software learns this capability by walking through the extended capability list of the host. xHCI specification describes DbC in section 7.6. This patch introduces the code to probe and