Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-11-02 Thread Lu, Baolu
On 10/30/2015 10:45 PM, Greg Kroah-Hartman wrote: On Fri, Oct 30, 2015 at 08:09:17PM +0800, Lu, Baolu wrote: On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: +static const char *get_extcap_desc(u32 cap_id) +{ + switch (cap_id) { + case XHCI_EXT_CAPS_LEGACY: +

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-30 Thread Lu, Baolu
On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: +static const char *get_extcap_desc(u32 cap_id) >+{ >+ switch (cap_id) { >+ case XHCI_EXT_CAPS_LEGACY: >+ return "USB Legacy Support"; >+ case XHCI_EXT_CAPS_PROTOCOL: >+ return "Supported Protocol"; >+ case

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-30 Thread Greg Kroah-Hartman
On Fri, Oct 30, 2015 at 08:09:17PM +0800, Lu, Baolu wrote: > > > On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: > >>+static const char *get_extcap_desc(u32 cap_id) > >>>+{ > >>>+ switch (cap_id) { > >>>+ case XHCI_EXT_CAPS_LEGACY: > >>>+ return "USB Legacy Support"; > >>>+ case

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Greg Kroah-Hartman
On Wed, Oct 28, 2015 at 04:00:32PM +0800, Lu Baolu wrote: > The xHCI host exports xHCI-specific extended capabilities utilizing > a method similar to PCI extended capabilities. In many cases, users > want to know whether a specific extended capability is supported by > a host. Unfortunately,

[PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu Baolu
The xHCI host exports xHCI-specific extended capabilities utilizing a method similar to PCI extended capabilities. In many cases, users want to know whether a specific extended capability is supported by a host. Unfortunately, currently there's no existing mechanisms in the kernel to do this.

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Oliver Neukum
On Wed, 2015-10-28 at 16:00 +0800, Lu Baolu wrote: > The xHCI host exports xHCI-specific extended capabilities utilizing > a method similar to PCI extended capabilities. In many cases, users > want to know whether a specific extended capability is supported by > a host. Unfortunately, currently

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu, Baolu
On 10/28/2015 05:27 PM, Oliver Neukum wrote: +static int fill_buffer(struct debug_buffer *buf) >+{ >+ int ret; >+ >+ if (buf->output_buf) >+ return -EINVAL; >+ >+ buf->alloc_size = PAGE_SIZE; >+ buf->output_buf = vmalloc(buf->alloc_size); That really makes no sense. If you

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu, Baolu
On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: >+struct debug_buffer { >+ ssize_t (*fill_func)(struct debug_buffer *); >+ struct usb_bus *bus; >+ struct mutex mutex; >+ size_t count; >+ char *output_buf; >+ size_t alloc_size; >+}; >+ >+static const char *get_extcap_desc(u32