Re: [PATCH 2/3] kbuild: Allow to specify composite modules with modname-m

2015-10-28 Thread Peter Chen
On Wed, Oct 28, 2015 at 02:25:41PM +0100, Michal Marek wrote: > From: Michal Marek > > This allows to write > > drm-$(CONFIG_AGP) += drm_agpsupport.o > > without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support > this syntax for modules, since built-in code depending on something

Re: [PATCHv2] usb: dwc2: use devm_phy_optional_get

2015-10-28 Thread Stephen Warren
On 10/27/2015 12:18 PM, Uwe Kleine-König wrote: > Hello, > > On Tue, Oct 27, 2015 at 09:08:27AM -0600, Stephen Warren wrote: >> On 10/27/2015 01:41 AM, Uwe Kleine-König wrote: >>> Hello, >>> >>> On Mon, Oct 26, 2015 at 08:08:58PM -0600, Stephen Warren wrote: On 10/26/2015 03:28 AM, Alexander

[PATCH v2 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-28 Thread Lu Baolu
Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint is busy with processing TRBs. This is not correct since dequeue pointer field in an endpoint context is only valid when the endpoint is in Halted or Stopped states. This buggy code causes aud

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu, Baolu
On 10/28/2015 08:33 PM, Greg Kroah-Hartman wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 29 ++--- 1 file changed, 26 insert

Re: [PATCH 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-28 Thread Lu, Baolu
On 10/28/2015 09:27 PM, Mathias Nyman wrote: On 28.10.2015 03:36, Lu Baolu wrote: Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint is busy with processing TRBs. This is not correct since dequeue pointer field in an endpoint context is

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu, Baolu
On 10/28/2015 05:10 PM, Johan Hovold wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 29 ++--- 1 file changed, 26 insertions(+

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 cap_i

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 al

[PATCH v5 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-28 Thread Konstantin Shkolnyy
Occasionally, writing data and immediately closing the port makes cp2108 stop responding. The device has to be unplugged to clear the error. The failure is induced by shutting down the device while its Tx queue still has unsent data. This condition is avoided by issuing PURGE command from the close

[PATCH v5 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-28 Thread Konstantin Shkolnyy
cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. However, SET_LINE_CTL functions properly. When the driver tries to modify the register, it reads it, modifies some bits and writes back. Because the read bytes were swapped, this often results in an invalid value to be written.

[PATCH v5 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-28 Thread Konstantin Shkolnyy
This change is preparation for implementing a cp2108 bug workaround. The workaround requires storing some private data. Right now the data is attached to the USB interface and allocated in the attach() callback. The bug detection requires USB I/O which is done easier from port_probe() callback rath

Re: Help needed for EHCI problem: removing an active bulk-in QH

2015-10-28 Thread Michael Reutman
On Wed, Oct 28, 2015 at 10:48 AM, Alan Stern wrote: > A smoking gun! Notice near the end of your dmesg log this line: > > [ 1520.794032] ehci-pci :00:16.2: qh 88032718ca80 should be inactive! > > It appears just before the hang occurred and nowhere else. That means > my suspicion was cor

Re: MUSB peripheral DMA regression caused by driver core runtime PM change

2015-10-28 Thread Felipe Balbi
Hi, Tony Lindgren writes: > * Felipe Balbi [151023 09:48]: >> >> Hi, >> >> Tony Lindgren writes: >> > From: Tony Lindgren >> > Date: Fri, 23 Oct 2015 09:03:22 -0700 >> > Subject: [PATCH] usb: musb: omap2430: Fix regression caused by driver core >> > change >> > >> > Commit ddef08dd00f5 ("D

Re: MUSB peripheral DMA regression caused by driver core runtime PM change

2015-10-28 Thread Tony Lindgren
* Felipe Balbi [151023 09:48]: > > Hi, > > Tony Lindgren writes: > > From: Tony Lindgren > > Date: Fri, 23 Oct 2015 09:03:22 -0700 > > Subject: [PATCH] usb: musb: omap2430: Fix regression caused by driver core > > change > > > > Commit ddef08dd00f5 ("Driver core: wakeup the parent device befo

Re: implement put_char() in cdc-acm

2015-10-28 Thread Oliver Neukum
On Wed, 2015-10-28 at 16:53 +0100, Sven Brauch wrote: > > I would much rather rework URB flow + unthrottle, as I previously > > outlined in the original thread instead of introducing another > > buffering layer. > From my non-kernel-dev point of view, this seems the way to go if the > strategy in m

Re: implement put_char() in cdc-acm

2015-10-28 Thread Peter Hurley
On 10/28/2015 11:53 AM, Sven Brauch wrote: > On 28/10/15 13:23, Peter Hurley wrote: >> Sven, please test Oliver's patch on that tree. > I will do as soon as I get around to it, I hope on the weekend. Ok. I'll get you the kworker scheduler latency profiling howto so we can find out what accounts

Re: implement put_char() in cdc-acm

2015-10-28 Thread Sven Brauch
Hey, On 28/10/15 13:23, Peter Hurley wrote: > Sven, please test Oliver's patch on that tree. I will do as soon as I get around to it, I hope on the weekend. > Lastly, please confirm your test method/termios settings (iow, are > you using a reproducer or just 'cat big_file > /dev/ttyACM1') Sorry,

Re: Help needed for EHCI problem: removing an active bulk-in QH

2015-10-28 Thread Alan Stern
On Wed, 28 Oct 2015, Michael Reutman wrote: > Alan: I ran the test again with your latest patch and collected the > output of ehci async and dmesg. You should find their output attached > to this email. Let me know if you need anything else. A smoking gun! Notice near the end of your dmesg log t

Re: Help needed for EHCI problem: removing an active bulk-in QH

2015-10-28 Thread Michael Reutman
On Tue, Oct 27, 2015 at 6:35 PM, Michael Reutman wrote: > On Mon, Oct 26, 2015 at 11:11 AM, Alan Stern > wrote: >> Michael: >> >> In the absence of any suggestions, we might as well try to verify my >> idea about what's going wrong. The patch below adds a little more >> debugging information; p

Re: [PATCH v3 1/7] usb: host: xhci: fix hcd private size

2015-10-28 Thread Mathias Nyman
On 26.10.2015 10:12, Yoshihiro Shimoda wrote: This patch fixes the hcd private size to sutabile size. The previous code has "sizeof(struct xhci_hcd *)" in xhci_hc_driver as hcd_priv_size and sizeof(struct xhci_hcd) in xhci_plat_overrides or xhci_pci_overrides as extra_priv_size. However, the xhci

[PATCH V3] usb: remove unnecessary CONFIG_PM dependency from USB_OTG

2015-10-28 Thread Nathan Sullivan
The USB OTG support currently depends on power management (CONFIG_PM) being enabled, but does not actually need it enabled. Remove this dependency. Remove the unneeded "default n" from USB_OTG as well, the default is already n. Tested on Bay Trail hardware with dwc3 USB. Signed-off-by: Nathan Su

[PATCH 2/3] kbuild: Allow to specify composite modules with modname-m

2015-10-28 Thread Michal Marek
From: Michal Marek This allows to write drm-$(CONFIG_AGP) += drm_agpsupport.o without having to handle CONFIG_AGP=y vs. CONFIG_AGP=m. Only support this syntax for modules, since built-in code depending on something modular cannot work and init/Makefile actually relies on the current semantics

Re: [PATCH 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-28 Thread Mathias Nyman
On 28.10.2015 03:36, Lu Baolu wrote: Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint is busy with processing TRBs. This is not correct since dequeue pointer field in an endpoint context is only valid when the endpoint is in Halted or Sto

Re: [PATCH 3/5] Add device tree support for M-USB on AM35xx SOCs

2015-10-28 Thread Sergei Shtylyov
Hello. On 10/23/2015 6:51 PM, Rolf Peukert wrote: Add a function that sets up necessary data structures. In older kernels this was done in a board_ file. To support initialization via a DT, this now needs to be included in the probe() function. Also declare a new device 'compatible' name (am35x

Re: implement put_char() in cdc-acm

2015-10-28 Thread Peter Hurley
On 10/28/2015 08:33 AM, Oliver Neukum wrote: > Peter, do you think I ought to upstream the support for put_char() ? Yes, but I owe you a test jig to validate it first. I'll do my best to get that to you today. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe lin

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, curren

Re: implement put_char() in cdc-acm

2015-10-28 Thread Oliver Neukum
On Wed, 2015-10-28 at 08:23 -0400, Peter Hurley wrote: > On 10/28/2015 07:04 AM, Oliver Neukum wrote: > > On Tue, 2015-10-27 at 16:45 +0100, Sven Brauch wrote: > >> Hey Oliver, > >> > >> On 27/10/15 16:07, Oliver Neukum wrote: > > That is unfortunate. So your problem is with not enough buffers. >

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Greg Kroah-Hartman
On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: > This patch add dbc debug device support in usb_debug driver. > > Signed-off-by: Lu Baolu > --- > drivers/usb/serial/usb_debug.c | 29 ++--- > 1 file changed, 26 insertions(+), 3 deletions(-) > > diff --git a/dri

Re: implement put_char() in cdc-acm

2015-10-28 Thread Peter Hurley
On 10/28/2015 07:04 AM, Oliver Neukum wrote: > On Tue, 2015-10-27 at 16:45 +0100, Sven Brauch wrote: >> Hey Oliver, >> >> On 27/10/15 16:07, Oliver Neukum wrote: >>> the theory that the lack of support for put_char() is a >>> major contributor to character loss in cdc-acm can be tested. >>> Sven, c

RE: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver

2015-10-28 Thread Subbaraya Sundeep Bhatta
Hi Kishon, > -Original Message- > From: Kishon Vijay Abraham I [mailto:kis...@ti.com] > Sent: Sunday, October 11, 2015 8:11 PM > To: Punnaiah Choudary Kalluri; ba...@ti.com > Cc: Rob Herring; Subbaraya Sundeep Bhatta; Peter Chen; > devicet...@vger.kernel.org; gre...@linuxfoundation.org; li

Re: implement put_char() in cdc-acm

2015-10-28 Thread Oliver Neukum
On Tue, 2015-10-27 at 16:45 +0100, Sven Brauch wrote: > Hey Oliver, > > On 27/10/15 16:07, Oliver Neukum wrote: > > the theory that the lack of support for put_char() is a > > major contributor to character loss in cdc-acm can be tested. > > Sven, could you test the attached patch? It implements >

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 the

Re: [PATCH] usb : replace dma_pool_alloc and memset with dma_pool_zalloc

2015-10-28 Thread Peter Chen
On Wed, Oct 28, 2015 at 12:44:35PM +0530, Saurabh Sengar wrote: > replace dma_pool_alloc and memset with a single call to dma_pool_zalloc > > Signed-off-by: Saurabh Sengar > --- > drivers/usb/chipidea/udc.c | 3 +-- > drivers/usb/gadget/udc/gr_udc.c | 3 +-- > drivers/usb/host/uhci-q.c

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Johan Hovold
On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: > This patch add dbc debug device support in usb_debug driver. > > Signed-off-by: Lu Baolu > --- > drivers/usb/serial/usb_debug.c | 29 ++--- > 1 file changed, 26 insertions(+), 3 deletions(-) > +static struct us

Re: [PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-28 Thread Johan Hovold
On Tue, Oct 27, 2015 at 04:53:34PM -0500, Konstantin Shkolnyy wrote: > cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. > However, SET_LINE_CTL functions properly. When the driver tries to modify > the register, it reads it, modifies some bits and writes back. Because the > re

[PATCH 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-10-28 Thread Lu Baolu
xHCI compatible USB3 host controller may provide debug capability which enables low-level system debug over USB. In order to probing this debug capability, Linux kernel needs to map and access the mmio of the host controller during early boot. This patch adds permenent fixmap pages in fixed_addres

[PATCH 00/12] usb: early: add support for early printk through USB3 debug port

2015-10-28 Thread Lu Baolu
This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI specification as an optional extended capability. The first patch adds a file in debugfs, through which users can check whether the debug capability is supported by a specific host control

[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. This

[PATCH 05/12] usb: xhci: dbc: add debug buffer

2015-10-28 Thread Lu Baolu
"printk" is not suitable for dbc debugging especially when console is in usage. This patch adds a debug buffer in dbc driver and puts the debug messages in this local buffer. The debug buffer could be dumped whenever the console is not in use. This part of code will not be visible unless DBC_DEBUG

[PATCH 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-10-28 Thread Lu Baolu
xHCI debug capability (DbC) is an optional functionality provided by an xHCI host controller. Software learns this capability by walking through the extended capability list in mmio of the host. This patch introduces the code to probe and initialize the debug capability hardware during early boot.

[PATCH 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-10-28 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 373 +++ include/linux/usb/xhci-db

[PATCH 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-10-28 Thread Lu Baolu
On Intel platform, if the debug target is connected with debug host, enabling DCE bit in command register leads to a hung bus state. In the hung state, the host system will not see a port connected status bit set. Hence debug target fails to be probed. The state could be resolved by performing a p

[PATCH 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-10-28 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu --- Documentation/kernel-parameters.txt | 1 +

[PATCH 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-10-28 Thread Lu Baolu
After DbC setup, debug target needs to wait until tty driver and application (e.g. mincom) on debug taget start. Otherwise, out messages might be ignored. This patch adds a ping/pong mechanism between debug target and host. Debug target will be waiting there until user presses 'Y' or 'y' in the t

[PATCH 08/12] usb: xhci: dbc: handle endpoint stall

2015-10-28 Thread Lu Baolu
In case of endpoint stall, software is able to detect the situation by reading DCCTRL.HIT or DCCTRL.HOT bits. DbC follows the normal USB framework to handle endpoint stall. When software detects endpoint stall situation, it should wait until endpoint is recovered before read or write oprations. Si

[PATCH 12/12] usb: doc: add document for xHCI DbC driver

2015-10-28 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and usage guide for USB3 debug port. Signed-off-by: Lu Baolu --- Documentation/usb/xhci-dbc.txt | 325 + MAINTAINERS| 1 + drivers/usb/early/xhci-dbc.c |

[PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu Baolu
This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ca2fa5b

[PATCH 07/12] usb: xhci: dbc: handle dbc-configured exit

2015-10-28 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 28 +++

[PATCH] usb : replace dma_pool_alloc and memset with dma_pool_zalloc

2015-10-28 Thread Saurabh Sengar
replace dma_pool_alloc and memset with a single call to dma_pool_zalloc Signed-off-by: Saurabh Sengar --- drivers/usb/chipidea/udc.c | 3 +-- drivers/usb/gadget/udc/gr_udc.c | 3 +-- drivers/usb/host/uhci-q.c | 3 +-- drivers/usb/host/whci/qset.c| 3 +-- drivers/usb/host/xhci-mem.