Re: [PATCH] usb: musb: add printf attribute to log function

2021-01-07 Thread Bin Liu
Hi, On Tue, Dec 22, 2020 at 01:52:48AM -0800, Joe Perches wrote: > On Tue, 2020-12-22 at 09:52 +0100, Greg KH wrote: > > On Mon, Dec 21, 2020 at 08:25:47AM -0800, t...@redhat.com wrote: > > > From: Tom Rix > > > > > > Attributing the function allows the compiler to more thoroughly > > > check

Re: [PATCH] [v3] usb: musb: Fix runtime PM imbalance on error

2020-05-22 Thread Bin Liu
On Fri, May 22, 2020 at 01:42:35PM +0800, Dinghao Liu wrote: > When copy_from_user() returns an error code, there > is a runtime PM usage counter imbalance. > > Fix this by moving copy_from_user() to the beginning > of this function. > > Signed-off-by: Dinghao Liu > --- > > Changelog: > > v2:

Re: [PATCH] usb: musb: jz4740: Prevent lockup when CONFIG_SMP is set

2020-05-21 Thread Bin Liu
Paul, On Thu, May 21, 2020 at 04:30:28PM -0500, Bin Liu wrote: > On Thu, May 21, 2020 at 10:39:25PM +0200, Paul Cercueil wrote: > > Hi Bin, > > > > The patch it fixes was introduced in 5.7-rc1, is it possible to queue it for > > the next -rc? Otherwise I'll need to Cc

Re: [PATCH] usb: musb: jz4740: Prevent lockup when CONFIG_SMP is set

2020-05-21 Thread Bin Liu
On Thu, May 21, 2020 at 10:39:25PM +0200, Paul Cercueil wrote: > Hi Bin, > > The patch it fixes was introduced in 5.7-rc1, is it possible to queue it for > the next -rc? Otherwise I'll need to Cc it to linux-stable. I pinged Grag if he can directly take it for -rc7. -Bin.

Re: [PATCH] usb: musb: jz4740: Prevent lockup when CONFIG_SMP is set

2020-05-21 Thread Bin Liu
he boards > supported by this driver needs SMP. > > Fixes: 57aadb46bd63 ("usb: musb: jz4740: Add support for DMA") > Signed-off-by: Paul Cercueil Is it too late if you directly take this patch for v5.7-rc7? The bug is introduced in v5.7-rc1. If so, here is my Acked-by: A

Re: [PATCH] usb: musb: Fix runtime PM imbalance on error

2020-05-21 Thread Bin Liu
Hi, On Thu, May 21, 2020 at 03:35:47PM +0800, Dinghao Liu wrote: > When copy_from_user() returns an error code, a pairing > runtime PM usage counter decrement is needed to keep > the counter balanced. > > Signed-off-by: Dinghao Liu > --- > drivers/usb/musb/musb_debugfs.c | 5 - > 1 file

Re: [PATCH] usb: musb: jz4740: Prevent lockup when CONFIG_SMP is set

2020-05-21 Thread Bin Liu
On Wed, May 20, 2020 at 05:01:11PM +0200, Paul Cercueil wrote: > The function dma_controller_irq() locks up the exact same spinlock we > locked before calling it, which obviously resulted in a deadlock when > CONFIG_SMP was enabled. This flew under the radar as none of the boards > supported by

Re: [PATCH v1] usb: musb: dsps: set MUSB_DA8XX quirk for AM335x

2020-05-20 Thread Bin Liu
On Wed, May 20, 2020 at 06:49:34AM +0200, Oleksij Rempel wrote: > On Tue, May 19, 2020 at 05:18:51PM -0500, Bin Liu wrote: > > Hi, > > > > On Fri, Mar 27, 2020 at 06:38:49AM +0100, Oleksij Rempel wrote: > > > Beagle Bone Black has different memory corruptions

Re: [PATCH] usb: musb: mediatek: add reset FADDR to zero in reset interrupt handle

2020-05-19 Thread Bin Liu
On Thu, May 14, 2020 at 03:33:25PM +0800, Min Guo wrote: > On Thu, 2020-05-14 at 12:01 +0800, Macpaul Lin wrote: > > When receiving reset interrupt, FADDR need to be reset to zero in > > periphearl mode. Otherwise ep0 cannot do enumeration when re-pluging USB > > cable. > > > > Signed-off-by:

Re: [PATCH] usb: musb: use true for 'use_dma'

2020-05-19 Thread Bin Liu
On Sun, Apr 26, 2020 at 05:41:30PM +0800, Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/usb/musb/musb_core.c:1798:12-19: WARNING: Assignment of 0/1 to > bool variable > > Signed-off-by: Jason Yan Queued for v5.8. Thanks. -Bin.

Re: [PATCH v1] usb: musb: dsps: set MUSB_DA8XX quirk for AM335x

2020-05-19 Thread Bin Liu
Hi, On Fri, Mar 27, 2020 at 06:38:49AM +0100, Oleksij Rempel wrote: > Beagle Bone Black has different memory corruptions if kernel is > configured with USB_TI_CPPI41_DMA=y. This issue is reproducible with > ath9k-htc driver (ar9271 based wifi usb controller): > > root@AccessBox:~ iw dev wlan0

Re: [PATCH v2 0/6] musb: Improve performance for hub-attached webcams

2019-07-02 Thread Bin Liu
Matwey, On Tue, Jul 02, 2019 at 08:29:03PM +0300, Matwey V. Kornilov wrote: > Ping? I was offline and just got back. I will review it soon. Sorry for the delay. -Bin. > > пт, 14 июн. 2019 г. в 19:47, Matwey V. Kornilov : > > > > The series is concerned to issues with isochronous transfer

Re: [PATCH] usb: musb: Force-disable pullup on shutdown

2019-04-03 Thread Bin Liu
On Tue, Apr 02, 2019 at 09:58:42PM +0200, Paul Cercueil wrote: > Hi, > > Le lun. 1 avril 2019 à 20:20, Bin Liu a écrit : > >On Mon, Apr 01, 2019 at 07:46:22PM +0200, Paul Cercueil wrote: > >> > >> > >> Le lun. 1 avril 2019 à 19:17, Bin Liu a écrit

Re: [PATCH] USB: musb: mark expected switch fall-through

2019-02-12 Thread Bin Liu
-by: Gustavo A. R. Silva I've closed my musb tree for v5.1-rc1, if you want to directly pick this patch, here is my Acked-by, or I will take it for v5.2-rc1. Acked-by: Bin Liu > --- > drivers/usb/musb/musb_host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

Re: [PATCH AUTOSEL 4.19 177/258] usb: musb: dsps: fix runtime pm for peripheral mode

2019-01-28 Thread Bin Liu
Hi Sasha, On Mon, Jan 28, 2019 at 10:58:03AM -0500, Sasha Levin wrote: > From: Bin Liu > > [ Upstream commit 54578ee883e34d2d1c518d48f1c1e2dd3f387188 ] > > Since the runtime PM support was added in musb, dsps relies on the timer > calling otg_timer() to activate the usb

Re: [PATCH AUTOSEL 4.19 176/258] usb: musb: dsps: fix otg state machine

2019-01-28 Thread Bin Liu
Hi Sasha, On Mon, Jan 28, 2019 at 10:58:02AM -0500, Sasha Levin wrote: > From: Bin Liu > > [ Upstream commit 6010abf2c2c0e382d7e8ee44bd11f343aae90cce ] > > Due to lack of ID pin interrupt event on AM335x devices, the musb dsps > driver uses polling to detect usb device at

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-25 Thread Bin Liu
On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote: > By the way, why do we need to store the qh in urb->hcpriv? > qh can always be accessible through urb->ep->hcpriv > Wouldn't it be better to drop entire urb->hcpriv usage? I am not sure why. The code is there since the first

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-25 Thread Bin Liu
On Wed, Jan 23, 2019 at 08:51:42PM +0300, Matwey V. Kornilov wrote: > We assign "urb->hcpriv = qh;" a few lines down. The valid qh for the urb is > hep->hcpriv in this code path. > > Fixes: 714bc5ef3eda ("musb: potential use after free") > Signed-off-by: Matwey V. Kornilov > --- >

Re: [PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller

2019-01-22 Thread Bin Liu
Hi Min, On Tue, Jan 22, 2019 at 05:36:13PM +0800, Min Guo wrote: > Hi Bin, > > Sorry to bother you again, I encounter a problem about the extcon > property. > > I don't find a common driver describing the usb-connector. Is > there any driver that I can refer to, specially the way to switch MUSB

Re: [PATCH v4 6/6] usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread Bin Liu
Hi Min, On Mon, Jan 21, 2019 at 08:22:31PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode. > There are some quirk of MediaTek musb controller, such as: > -W1C interrupt status registers > -Private data

Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface

2019-01-21 Thread Bin Liu
Hi Min, On Mon, Jan 21, 2019 at 08:22:30PM +0800, min@mediatek.com wrote: > From: Min Guo > > Delete the const attribute of addr parameter in readb/w/l hooks, these > changes are for implementing clearing W1C registers. > Replace musb_readb/w with musb_clearb/w to clear the interrupt

Re: [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver

2019-01-21 Thread Bin Liu
On Thu, Jan 17, 2019 at 07:33:27PM -0300, Paul Cercueil wrote: > This commit adds documentation for the device-tree bindings of the > jz4740-musb driver, which provides support for the USB gadget mode > of the JZ4740 and similar SoCs from Ingenic. > > Signed-off-by: Paul Cercueil > Reviewed-by:

Re: [PATCH v3 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-18 Thread Bin Liu
Hi Min, On Fri, Jan 18, 2019 at 02:14:14PM +0800, Min Guo wrote: > On Thu, 2019-01-17 at 06:33 -0800, Tony Lindgren wrote: > > Hi, > > > > * min@mediatek.com [190117 07:16]: > > > There are some quirk of MediaTek musb controller, such as: > > > -W1C interrupt status registers > > >

Re: [PATCH v3 0/4] Add MediaTek MUSB Controller Driver

2019-01-17 Thread Bin Liu
On Thu, Jan 17, 2019 at 03:15:44PM +0800, min@mediatek.com wrote: > From: Min Guo > > These patches introduce the MediaTek MUSB controller driver. > > The driver can be configured as Dual-Role Device (DRD), > Peripheral Only and Host Only modes. This has beed tested on > MT2701 with a

Re: [PATCH v3] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-16 Thread Bin Liu
On Tue, Jan 15, 2019 at 07:01:45PM -0500, Paul Elder wrote: > Handling short packets (length < max packet size) in the Inventra DMA > engine in the MUSB driver causes the MUSB DMA controller to hang. An > example of a problem that is caused by this problem is when streaming > video out of a UVC

Re: [PATCH v2 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-16 Thread Bin Liu
On Wed, Jan 16, 2019 at 05:39:02PM +0800, Min Guo wrote: > Hi Bin, > > On Tue, 2019-01-15 at 14:38 -0600, Bin Liu wrote: > > Hi Min, > > > > very close, thanks. > > Below I tried to explain a further cleanup in musb_clearb/w() and > > musb_get/set_togg

Re: [PATCH v2 3/4] usb: musb: Extract set toggle as a separate interface

2019-01-15 Thread Bin Liu
Hi Min, On Tue, Jan 15, 2019 at 04:19:42PM +0100, Matthias Brugger wrote: > > > On 15/01/2019 02:43, min@mediatek.com wrote: > > From: Min Guo > > > > Add a common interface for set data toggle > > > > Signed-off-by: Min Guo > > --- > > drivers/usb/musb/musb_host.c | 37

Re: [PATCH v2 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-15 Thread Bin Liu
Hi Min, very close, thanks. Below I tried to explain a further cleanup in musb_clearb/w() and musb_get/set_toggle() implementation. Please let me know if it is not clear. Basically, we don't need musb_default_clearb/w(), just assign the musb_io function pointers to musb_readb/w(). Then the mtk

Re: [PATCH v2] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-15 Thread Bin Liu
Hi Paul, On Fri, Jan 11, 2019 at 12:31:59AM -0500, Paul Elder wrote: > Hi Bin, > > On Wed, Jan 09, 2019 at 09:02:15AM -0600, Bin Liu wrote: > > Hi Paul, > > > > On Wed, Jan 09, 2019 at 02:10:09AM -0500, Paul Elder wrote: > > > Handling short packets (lengt

Re: [PATCH v2 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740

2019-01-15 Thread Bin Liu
Hi Paul, On Thu, Jan 10, 2019 at 10:36:59AM -0300, Paul Cercueil wrote: > Depending on MACH_INGENIC prevent us from creating a generic kernel that Again, did you mean MACH_JZ4740 instead? > works on more than one MIPS board. Instead, we just depend on MIPS being > set. > > Signed-off-by: Paul

Re: [PATCH 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-10 Thread Bin Liu
Hi Min, Please briefly summarize the controller differences in the commit log, such as - WIC interrupt registers; - data toggle bit; - no dedicated DMA interrupt line; so that we can quickly understand the core driver is modified accordingly to handle the differences. On Thu, Jan 10, 2019 at

Re: [PATCH v2] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-09 Thread Bin Liu
Hi Paul, On Wed, Jan 09, 2019 at 02:10:09AM -0500, Paul Elder wrote: > Handling short packets (length < max packet size) in the Inventra DMA > engine in the MUSB driver causes the MUSB DMA controller to hang. An > example of a problem that is caused by this problem is when streaming > video out

Re: [PATCH 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-09 Thread Bin Liu
Hi Min, On Wed, Jan 09, 2019 at 08:31:08PM +0800, Min Guo wrote: > Hi Bin, > On Tue, 2019-01-08 at 09:44 -0600, Bin Liu wrote: > > Hi, > > > > On Thu, Dec 27, 2018 at 03:34:26PM +0800, min@mediatek.com wrote: > > > From: Min Guo > > > > >

Re: [PATCH] usb: gadget: musb: fix short isoc packets with inventra dma for pandaboard es

2019-01-08 Thread Bin Liu
On Mon, Jan 07, 2019 at 11:45:24PM -0500, Paul Elder wrote: > Hi Bin, > > On Mon, Jan 07, 2019 at 01:11:57PM -0600, Bin Liu wrote: > > Hi Paul, > > > > Sorry for the delay on reviewing it. > > Thanks for the review. > > > For the subject, can you plea

Re: [PATCH 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-08 Thread Bin Liu
Hi, On Thu, Dec 27, 2018 at 03:34:26PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode > > Signed-off-by: Min Guo > Signed-off-by: Yonglong Wu > --- > drivers/usb/musb/Kconfig | 8 +- >

Re: [PATCH 1/4] dt-bindings: usb: musb: Add support for MediaTek musb controller

2019-01-07 Thread Bin Liu
Hi, On Thu, Dec 27, 2018 at 03:34:23PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode > > Signed-off-by: Min Guo > --- > .../devicetree/bindings/usb/mediatek,musb.txt | 49 > ++

Re: [PATCH] USB: musb: fix indentation issue on a return statement

2019-01-07 Thread Bin Liu
Hi, On Fri, Jan 04, 2019 at 05:59:41PM +, Colin King wrote: > From: Colin Ian King > > A return statement is indented one level too far, fix this by removing > a tab. > > Signed-off-by: Colin Ian King > --- > drivers/usb/musb/musb_host.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 4/4] usb: musb: jz4740: Drop dependency on USB_OTG_BLACKLIST_HUB

2019-01-07 Thread Bin Liu
Hi, Please use the following subject instead. usb: musb: Kconfig: Drop dependency on USB_OTG_BLACKLIST_HUB for jz4740 Regards, -Bin. On Thu, Dec 13, 2018 at 03:45:55PM +0100, Paul Cercueil wrote: > The USB IP in the JZ4740 SoC does not support host mode, only gadget > mode. > >

Re: [PATCH 3/4] usb: musb: jz4740: Drop dependency on MACH_JZ4740, use COMPILE_TEST

2019-01-07 Thread Bin Liu
Hi, Please use the following subject instead. usb: musb: Kconfig: Drop dependency on MACH_JZ4740 and use COMPILE_TEST for jz4740 On Thu, Dec 13, 2018 at 03:45:54PM +0100, Paul Cercueil wrote: > Depending on MACH_INGENIC prevent us from creating a generic kernel that did you

Re: [PATCH 2/4] usb: musb: jz4740: Add support for devicetree

2019-01-07 Thread Bin Liu
Hi, On Thu, Dec 13, 2018 at 03:45:53PM +0100, Paul Cercueil wrote: > Add support for probing the driver from devicetree. > > Signed-off-by: Paul Cercueil > --- > drivers/usb/musb/jz4740.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/usb/musb/jz4740.c

Re: [PATCH] usb: gadget: musb: fix short isoc packets with inventra dma for pandaboard es

2019-01-07 Thread Bin Liu
Hi Paul, Sorry for the delay on reviewing it. For the subject, can you please use usb: musb: gadget: fix short isoc packets with inventra dma On Tue, Oct 09, 2018 at 02:32:20AM -0400, Paul Elder wrote: > Handling short packets (length < max packet size) in the Inventra DMA > engine in

Re: [PATCH 4.4 81/91] dmaengine: cppi41: delete channel from pending list when stop channel

2018-12-12 Thread Bin Liu
maengine: cppi41: Add basic PM runtime support") I am sorry for the noise. > > ---------- > > From: Bin Liu > > commit 59861547ec9a9736e7882f6fb0c096a720ff811a upstream. > > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 &&a

Re: [PATCH 3.18 48/54] dmaengine: cppi41: delete channel from pending list when stop channel

2018-12-12 Thread Bin Liu
maengine: cppi41: Add basic PM runtime support") I am sorry for the noise. > ------ > > From: Bin Liu > > commit 59861547ec9a9736e7882f6fb0c096a720ff811a upstream. > > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 &&

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Bin Liu
Peter, On Wed, Dec 12, 2018 at 10:04:25AM +0800, Peter Chen wrote: [snip] > > >I strongly advise against using dev_dbg() for debugging. Even more so > > >inside your IRQ handler. > > Felipe, I use Dynamic Debug for debugging, and show debug messages with > "dmesg" after testing/debugging. I

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-05-01 Thread Bin Liu
On Tue, May 01, 2018 at 03:26:57PM +0200, Paul Kocialkowski wrote: > Hi, > > Le mardi 01 mai 2018 à 07:25 -0500, Bin Liu a écrit : > > On Mon, Apr 30, 2018 at 11:08:42PM +0200, Paul Kocialkowski wrote: > > > Hi, > > > > > > Le samedi 21 avril 2018 à 0

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-05-01 Thread Bin Liu
On Tue, May 01, 2018 at 03:26:57PM +0200, Paul Kocialkowski wrote: > Hi, > > Le mardi 01 mai 2018 à 07:25 -0500, Bin Liu a écrit : > > On Mon, Apr 30, 2018 at 11:08:42PM +0200, Paul Kocialkowski wrote: > > > Hi, > > > > > > Le samedi 21 avril 2018 à 0

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-05-01 Thread Bin Liu
On Mon, Apr 30, 2018 at 11:08:42PM +0200, Paul Kocialkowski wrote: > Hi, > > Le samedi 21 avril 2018 à 09:34 -0500, Bin Liu a écrit : > > Okay, this came down to an argument that whether we should require > > loading a gadget driver on a dual-role port to work in host mode, &

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-05-01 Thread Bin Liu
On Mon, Apr 30, 2018 at 11:08:42PM +0200, Paul Kocialkowski wrote: > Hi, > > Le samedi 21 avril 2018 à 09:34 -0500, Bin Liu a écrit : > > Okay, this came down to an argument that whether we should require > > loading a gadget driver on a dual-role port to work in host mode, &

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-04-21 Thread Bin Liu
On Sat, Apr 21, 2018 at 12:59:23PM +0200, Paul Kocialkowski wrote: > Hi, > > Le vendredi 20 avril 2018 à 09:25 -0500, Bin Liu a écrit : > > On Thu, Mar 29, 2018 at 01:57:24PM +0200, Paul Kocialkowski wrote: > > > Hi, > > > > > > On Thu, 2018

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-04-21 Thread Bin Liu
On Sat, Apr 21, 2018 at 12:59:23PM +0200, Paul Kocialkowski wrote: > Hi, > > Le vendredi 20 avril 2018 à 09:25 -0500, Bin Liu a écrit : > > On Thu, Mar 29, 2018 at 01:57:24PM +0200, Paul Kocialkowski wrote: > > > Hi, > > > > > > On Thu, 2018

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-04-20 Thread Bin Liu
On Thu, Mar 29, 2018 at 01:57:24PM +0200, Paul Kocialkowski wrote: > Hi, > > On Thu, 2018-03-29 at 11:23 +0200, Maxime Ripard wrote: > > On Wed, Mar 28, 2018 at 11:52:13PM +0200, Paul Kocialkowski wrote: > > > This allows dual-role ports to be reported as having gadget mode by > > > the > > >

Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role

2018-04-20 Thread Bin Liu
On Thu, Mar 29, 2018 at 01:57:24PM +0200, Paul Kocialkowski wrote: > Hi, > > On Thu, 2018-03-29 at 11:23 +0200, Maxime Ripard wrote: > > On Wed, Mar 28, 2018 at 11:52:13PM +0200, Paul Kocialkowski wrote: > > > This allows dual-role ports to be reported as having gadget mode by > > > the > > >

Re: [PATCH 0/3] USB: musb: dsps: phy fix and DT-topology support

2018-04-18 Thread Bin Liu
On Wed, Apr 18, 2018 at 08:46:40PM +0200, Johan Hovold wrote: > On Wed, Apr 18, 2018 at 11:20:15AM -0500, Bin Liu wrote: > > Johan, > > > > On Fri, Apr 13, 2018 at 05:15:02PM +0200, Johan Hovold wrote: > > > I've been carrying a patch out-of-tree since my work on

Re: [PATCH 0/3] USB: musb: dsps: phy fix and DT-topology support

2018-04-18 Thread Bin Liu
On Wed, Apr 18, 2018 at 08:46:40PM +0200, Johan Hovold wrote: > On Wed, Apr 18, 2018 at 11:20:15AM -0500, Bin Liu wrote: > > Johan, > > > > On Fri, Apr 13, 2018 at 05:15:02PM +0200, Johan Hovold wrote: > > > I've been carrying a patch out-of-tree since my work on

Re: [PATCH 0/3] USB: musb: dsps: phy fix and DT-topology support

2018-04-18 Thread Bin Liu
Johan, On Fri, Apr 13, 2018 at 05:15:02PM +0200, Johan Hovold wrote: > I've been carrying a patch out-of-tree since my work on improving the > USB device-tree support which is needed to be able to describe USB > topologies for musb based controllers. > > This patch, which associates the platform

Re: [PATCH 0/3] USB: musb: dsps: phy fix and DT-topology support

2018-04-18 Thread Bin Liu
Johan, On Fri, Apr 13, 2018 at 05:15:02PM +0200, Johan Hovold wrote: > I've been carrying a patch out-of-tree since my work on improving the > USB device-tree support which is needed to be able to describe USB > topologies for musb based controllers. > > This patch, which associates the platform

Re: [PATCH 3/3] USB: musb: dsps: propagate device-tree node

2018-04-16 Thread Bin Liu
Johan, On Fri, Apr 13, 2018 at 05:15:05PM +0200, Johan Hovold wrote: > To be able to use DSPS-based controllers with device-tree descriptions > of the USB topology, we need to associate the glue device's device-tree > node with the child controller device. > > Note that this can also be used to

Re: [PATCH 3/3] USB: musb: dsps: propagate device-tree node

2018-04-16 Thread Bin Liu
Johan, On Fri, Apr 13, 2018 at 05:15:05PM +0200, Johan Hovold wrote: > To be able to use DSPS-based controllers with device-tree descriptions > of the USB topology, we need to associate the glue device's device-tree > node with the child controller device. > > Note that this can also be used to

Re: [PATCH v3 1/1] usb: musb: gadget: misplaced out of bounds check

2018-03-20 Thread Bin Liu
Hi, On Tue, Mar 20, 2018 at 07:42:48PM +0100, Heinrich Schuchardt wrote: > musb->endpoints[] has array size MUSB_C_NUM_EPS. > We must check array bounds before accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt > --- > v3 > Remove

Re: [PATCH v3 1/1] usb: musb: gadget: misplaced out of bounds check

2018-03-20 Thread Bin Liu
Hi, On Tue, Mar 20, 2018 at 07:42:48PM +0100, Heinrich Schuchardt wrote: > musb->endpoints[] has array size MUSB_C_NUM_EPS. > We must check array bounds before accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt > --- > v3 > Remove superfluous braces. > v2 >

Re: [PATCH 1/1] usb: musb: gadget: misplaced out of bounds check

2018-03-19 Thread Bin Liu
Hi, On Mon, Mar 19, 2018 at 08:12:28AM +0100, Heinrich Schuchardt wrote: > musb->endpoints[] has array size MUSB_C_NUM_EPS. > We must check array bounds before accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt > --- >

Re: [PATCH 1/1] usb: musb: gadget: misplaced out of bounds check

2018-03-19 Thread Bin Liu
Hi, On Mon, Mar 19, 2018 at 08:12:28AM +0100, Heinrich Schuchardt wrote: > musb->endpoints[] has array size MUSB_C_NUM_EPS. > We must check array bounds before accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/usb/musb/musb_gadget_ep0.c | 7 ++-

Re: linux-next: build failure after merge of the asm-generic tree

2018-03-15 Thread Bin Liu
Hi, On Fri, Mar 16, 2018 at 09:13:55AM +1100, Stephen Rothwell wrote: > Hi Arnd, > > After merging the asm-generic tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit': > drivers/usb/musb/musb_host.c:577:10:

Re: linux-next: build failure after merge of the asm-generic tree

2018-03-15 Thread Bin Liu
Hi, On Fri, Mar 16, 2018 at 09:13:55AM +1100, Stephen Rothwell wrote: > Hi Arnd, > > After merging the asm-generic tree, today's linux-next build (arm > multi_v7_defconfig) failed like this: > > drivers/usb/musb/musb_host.c: In function 'musb_rx_reinit': > drivers/usb/musb/musb_host.c:577:10:

Re: [PATCH 38/47] usb: musb: remove blackfin port

2018-03-14 Thread Bin Liu
might want to remove it along with the whole parentheses? - tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)' + tristate 'Inventra Highspeed Dual Role Controller' Other than this, Acked-by: Bin Liu <b-...@ti.com> Regards, -Bin.

Re: [PATCH 38/47] usb: musb: remove blackfin port

2018-03-14 Thread Bin Liu
t along with the whole parentheses? - tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)' + tristate 'Inventra Highspeed Dual Role Controller' Other than this, Acked-by: Bin Liu Regards, -Bin.

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-13 Thread Bin Liu
Hi, On Mon, Mar 12, 2018 at 11:30:39PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 09/03/18 15:11, Bin Liu wrote: > > Hi, > > > > On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > >> This fixes an oops on unbind / module unload

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-13 Thread Bin Liu
Hi, On Mon, Mar 12, 2018 at 11:30:39PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 09/03/18 15:11, Bin Liu wrote: > > Hi, > > > > On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > >> This fixes an oops on unbind / module unload

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-09 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload (on the musb omap2430 > platform). > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. > > Signed-off-by: Merlijn Wajer

Re: [PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-09 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 11:19:48PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload (on the musb omap2430 > platform). > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. > > Signed-off-by: Merlijn Wajer Applied. Thanks. Regards,

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-09 Thread Bin Liu
On Thu, Mar 08, 2018 at 11:17:48PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 22:15, Bin Liu wrote: > > > please add patch version numbers in the subject when necessary. This > > helps cross-referencing. > > Will do. I naively assumed that the first patch

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-09 Thread Bin Liu
On Thu, Mar 08, 2018 at 11:17:48PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 22:15, Bin Liu wrote: > > > please add patch version numbers in the subject when necessary. This > > helps cross-referencing. > > Will do. I naively assumed that the first patch

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. Please also mention here that it happens on omap2430 platform. (omap2430 is the only platform affected by this bug.) Regards, -Bin.

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. Please also mention here that it happens on omap2430 platform. (omap2430 is the only platform affected by this bug.) Regards, -Bin.

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, please add patch version numbers in the subject when necessary. This helps cross-referencing. On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. >

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, please add patch version numbers in the subject when necessary. This helps cross-referencing. On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. >

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 07:00:16PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 17:46, Bin Liu wrote: > > > > No need to flush, the work is already cancelled at this point. > > > >> + > >>musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 07:00:16PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 17:46, Bin Liu wrote: > > > > No need to flush, the work is already cancelled at this point. > > > >> + > >>musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 10:31:21AM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. The fix is similar to the > one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: > fix late external abort on suspend), which only fixes the issue for >

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 10:31:21AM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. The fix is similar to the > one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: > fix late external abort on suspend), which only fixes the issue for >

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-06 Thread Bin Liu
On Mon, Mar 05, 2018 at 08:44:40PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 05/03/18 20:28, Bin Liu wrote: > > > The musb udc driver sets the state to b_idle without checking a > > gadget driver, this should be cleaned up. I have add this in my backlog. > > Bu

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-06 Thread Bin Liu
On Mon, Mar 05, 2018 at 08:44:40PM +0100, Merlijn Wajer wrote: > Hi Bin, > > On 05/03/18 20:28, Bin Liu wrote: > > > The musb udc driver sets the state to b_idle without checking a > > gadget driver, this should be cleaned up. I have add this in my backlog. > > Bu

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-05 Thread Bin Liu
Merlijn, On Fri, Mar 02, 2018 at 05:54:39PM +0100, Pali Rohár wrote: > On Friday 02 March 2018 17:47:52 Merlijn Wajer wrote: > > >> I would expect it to state "b_idle" instead of "(null)". > > > > > > Actually, I'd like to see (null) whenever a gadget driver is not loaded, > > > which indicates

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-05 Thread Bin Liu
Merlijn, On Fri, Mar 02, 2018 at 05:54:39PM +0100, Pali Rohár wrote: > On Friday 02 March 2018 17:47:52 Merlijn Wajer wrote: > > >> I would expect it to state "b_idle" instead of "(null)". > > > > > > Actually, I'd like to see (null) whenever a gadget driver is not loaded, > > > which indicates

Re: [PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-03-05 Thread Bin Liu
On Mon, Mar 05, 2018 at 08:35:10PM +0200, Ivaylo Dimitrov wrote: > Hi, > > On 5.03.2018 19:38, Bin Liu wrote: > >On Wed, Feb 28, 2018 at 01:59:43PM -0800, Tony Lindgren wrote: > >>* Merlijn Wajer <merl...@wizzup.org> [180227 22:29]: > >>>Without pm_runt

Re: [PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-03-05 Thread Bin Liu
On Mon, Mar 05, 2018 at 08:35:10PM +0200, Ivaylo Dimitrov wrote: > Hi, > > On 5.03.2018 19:38, Bin Liu wrote: > >On Wed, Feb 28, 2018 at 01:59:43PM -0800, Tony Lindgren wrote: > >>* Merlijn Wajer [180227 22:29]: > >>>Without pm_runtime_{get,put}_sync calls in

Re: [PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-03-05 Thread Bin Liu
On Wed, Feb 28, 2018 at 01:59:43PM -0800, Tony Lindgren wrote: > * Merlijn Wajer [180227 22:29]: > > Without pm_runtime_{get,put}_sync calls in place, reading > > vbus status via /sys causes the following error: > > > > Unhandled fault: external abort on non-linefetch

Re: [PATCH v2 1/1] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-03-05 Thread Bin Liu
On Wed, Feb 28, 2018 at 01:59:43PM -0800, Tony Lindgren wrote: > * Merlijn Wajer [180227 22:29]: > > Without pm_runtime_{get,put}_sync calls in place, reading > > vbus status via /sys causes the following error: > > > > Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060 > >

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Bin Liu
Hi, On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: > Hi, > > I found that the "mode" file in musb sys node will return "(null)" when > one would expect it show b_idle. > > Wrong /mode file: > > [Fresh boot, cable not connected yet] > root@n900devuan:~# modprobe g_nokia >

Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)

2018-03-02 Thread Bin Liu
Hi, On Fri, Mar 02, 2018 at 12:47:07AM +0100, Merlijn Wajer wrote: > Hi, > > I found that the "mode" file in musb sys node will return "(null)" when > one would expect it show b_idle. > > Wrong /mode file: > > [Fresh boot, cable not connected yet] > root@n900devuan:~# modprobe g_nokia >

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Bin Liu
On Mon, Feb 26, 2018 at 06:19:30PM +0100, Merlijn Wajer wrote: > Hi, > > On 26/02/18 16:57, Bin Liu wrote: > > Hi, > > > > On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: > >> Without pm_runtime_{get,put}_sync calls in place, reading > >&

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Bin Liu
On Mon, Feb 26, 2018 at 06:19:30PM +0100, Merlijn Wajer wrote: > Hi, > > On 26/02/18 16:57, Bin Liu wrote: > > Hi, > > > > On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: > >> Without pm_runtime_{get,put}_sync calls in place, reading > >&

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Bin Liu
Hi, On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: > Without pm_runtime_{get,put}_sync calls in place, reading > vbus status via /sys causes the following error: > > Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060 > pgd = b333e822 > [fa0ab060]

Re: [PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-26 Thread Bin Liu
Hi, On Mon, Feb 26, 2018 at 11:56:08AM +0100, Merlijn Wajer wrote: > Without pm_runtime_{get,put}_sync calls in place, reading > vbus status via /sys causes the following error: > > Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060 > pgd = b333e822 > [fa0ab060]

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-02-07 Thread Bin Liu
to check with and without. But > only can confirm that without "goto finish" function works with bunch > of drivers (usb ethernet, hids, hdd). Thanks for the confirmation. The revert patch has been sent out. Regards, -Bin. > > Best regards, > Maxim. > > 2018-01-25 19:31 GMT

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-02-07 Thread Bin Liu
to check with and without. But > only can confirm that without "goto finish" function works with bunch > of drivers (usb ethernet, hids, hdd). Thanks for the confirmation. The revert patch has been sent out. Regards, -Bin. > > Best regards, > Maxim. > > 2018-01-25 19:31 GMT

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 08:00:24PM +0100, Andreas Kemnade wrote: > Hi, > > On Tue, 6 Feb 2018 12:46:05 -0600 > Bin Liu <b-...@ti.com> wrote: > > > Hi, > > > > On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > > > On dm

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 08:00:24PM +0100, Andreas Kemnade wrote: > Hi, > > On Tue, 6 Feb 2018 12:46:05 -0600 > Bin Liu wrote: > > > Hi, > > > > On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > > > On dm3730 there are enumeration prob

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 10:47:25AM -0800, Tony Lindgren wrote: > * Andreas Kemnade [180127 08:34]: > > On dm3730 there are enumeration problems after resume. > > Investigation led to the cause that the MUSB_POWER_SOFTCONN > > bit is not set. If it was set before suspend

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-07 Thread Bin Liu
On Tue, Feb 06, 2018 at 10:47:25AM -0800, Tony Lindgren wrote: > * Andreas Kemnade [180127 08:34]: > > On dm3730 there are enumeration problems after resume. > > Investigation led to the cause that the MUSB_POWER_SOFTCONN > > bit is not set. If it was set before suspend (because it > > was

  1   2   3   4   5   >