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 th

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

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 cha

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 thi

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 if k

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: Macp

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 set

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 while

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(-) > > d

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 subs

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 comm

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 > --- > drivers/usb/mu

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 to

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 status.

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: R

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 > > > -Privat

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 variet

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 gad

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_toggle(

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 p

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 C

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 03

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 of

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 +- > drivers/usb

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 deleti

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. > > Signed-

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 mea

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 b/drivers/usb/mu

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 th

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 see

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-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-03-29 at 11

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 > > > musb

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 wor

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 e

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 > --- > 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: er

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

2018-03-14 Thread Bin Liu
o 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 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-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-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: [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 > musb_suspe

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 a

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 (0x1028) at 0xfa0ab060 > > p

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 > [Insert

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] *pgd=48011452

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-02-07 Thread Bin Liu
eck 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 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 (because it > > was enabled

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

2018-02-06 Thread Bin Liu
Hi, On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > 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 enabled via musb_pullup()), it is set in > mu

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-01-25 Thread Bin Liu
Maxim, On Thu, Jan 25, 2018 at 07:24:02PM +0300, Maxim Uvarov wrote: > [1] says that issue is with back ported driver to 3.12.10. Can the > latest kernel be tested on the same hw? Agreed that it should be tested with the latest kernel. But my concern now is if stopping scheduling urbs on errors i

Re: [PATCHv2] musb_host: fix lockup on rxcsr_h_error

2018-01-25 Thread Bin Liu
Hi Yegor and Max, On Tue, May 03, 2016 at 04:25:58PM +0200, Yegor Yefremov wrote: > On Tue, May 3, 2016 at 3:48 PM, Bin Liu wrote: > > Hi, > > > > On Tue, May 03, 2016 at 12:03:52PM +0200, Yegor Yefremov wrote: > >> On Thu, Apr 28, 2016 at 4:37 PM, Bin Liu wrote: &

[PATCH] Documentation: usb: fix typo in UVC gadgetfs config command

2018-01-09 Thread Bin Liu
This seems to be a copy&paste error. With the fix the uvc gadget now can be created by following the instrucitons. Signed-off-by: Bin Liu --- Documentation/usb/gadget-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/usb/gadget-testing.tx

Re: [PATCH 2/2] musb: remove unused pipe variable

2017-11-16 Thread Bin Liu
Hi, On Wed, Nov 15, 2017 at 07:20:35PM +, Corentin Labbe wrote: > This patch fix the following build warning: > drivers/usb/musb/musb_host.c:1809:8: warning: variable 'pipe' set but not > used [-Wunused-but-set-variable] > by removing the pipe variable in musb_host_rx() > > Signed-off-by: Co

Re: [PATCH 1/2] musb: remove unused frame variable

2017-11-16 Thread Bin Liu
Hi, On Wed, Nov 15, 2017 at 07:20:34PM +, Corentin Labbe wrote: > This patch fix the following warning > drivers/usb/musb/musb_host.c:223:8: warning: variable 'frame' set but not > used [-Wunused-but-set-variable] > by remove the frame variable in musb_start_urb(). > > Signed-off-by: Corenti

Re: [PATCH] usb: musb: musb_host: Introduce postponed URB giveback

2017-11-16 Thread Bin Liu
Hi, On Wed, Nov 15, 2017 at 06:19:08PM +0300, Matwey V. Kornilov wrote: > The issue is also present in 4.9.60-ti-r75 > > 2017-11-04 17:05 GMT+03:00 Matwey V. Kornilov : > > Hi Bin, > > > > I've just checked that the issue is still present in 4.13.10. I am not aware of any work having been done f

Re: [PATCH] usb: musb: Convert timers to use timer_setup()

2017-10-30 Thread Bin Liu
On Mon, Oct 30, 2017 at 09:52:15AM +0100, Greg Kroah-Hartman wrote: > On Fri, Oct 27, 2017 at 11:24:22AM -0500, Bin Liu wrote: > > Hi, > > > > On Tue, Oct 24, 2017 at 03:08:35AM -0700, Kees Cook wrote: > > > In preparation for unconditionally passing the struc

Re: [PATCH] usb: musb_core: mark expected switch fall-through

2017-10-30 Thread Bin Liu
On Mon, Oct 30, 2017 at 09:51:18AM +0100, Greg Kroah-Hartman wrote: > On Fri, Oct 27, 2017 at 11:56:14AM -0500, Bin Liu wrote: > > On Fri, Oct 27, 2017 at 06:49:49PM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Oct 27, 2017 at 11:44:47AM -0500, Bin Liu wrote: > > > &g

Re: [PATCH] usb: musb: Convert timers to use timer_setup()

2017-10-30 Thread Bin Liu
On Mon, Oct 30, 2017 at 09:52:15AM +0100, Greg Kroah-Hartman wrote: > On Fri, Oct 27, 2017 at 11:24:22AM -0500, Bin Liu wrote: > > Hi, > > > > On Tue, Oct 24, 2017 at 03:08:35AM -0700, Kees Cook wrote: > > > In preparation for unconditionally passing the struc

Re: [PATCH] usb: musb_core: mark expected switch fall-through

2017-10-27 Thread Bin Liu
On Fri, Oct 27, 2017 at 06:49:49PM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 27, 2017 at 11:44:47AM -0500, Bin Liu wrote: > > Hi, > > > > On Mon, Oct 23, 2017 at 10:10:43PM -0500, Gustavo A. R. Silva wrote: > > > In preparation to enabling -Wimplicit-

Re: [PATCH] usb: musb_core: mark expected switch fall-through

2017-10-27 Thread Bin Liu
Hi, On Mon, Oct 23, 2017 at 10:10:43PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 1397608 > Signed-off-by: Gustavo A. R. Silva Applied with the above Coverity-ID me

Re: [PATCH] usb: musb: Convert timers to use timer_setup()

2017-10-27 Thread Bin Liu
r-device static timer variable, a spare timer "dev_timer" > is added to the musb structure for devices to use for their per-device > timer. > > Cc: Bin Liu > Cc: Greg Kroah-Hartman > Cc: linux-...@vger.kernel.org > Signed-off-by: Kees Co

Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-16 Thread Bin Liu
On Mon, Oct 16, 2017 at 11:54:27PM +1100, Jonathan Liu wrote: > On 16 October 2017 at 23:49, Bin Liu wrote: > > On Mon, Oct 16, 2017 at 04:13:51PM +1100, Jonathan Liu wrote: > >> On 10 October 2017 at 14:22, Bin Liu wrote: > >> > On Tue, Oct 10, 2017 at 01:45:

Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-16 Thread Bin Liu
On Mon, Oct 16, 2017 at 04:13:51PM +1100, Jonathan Liu wrote: > On 10 October 2017 at 14:22, Bin Liu wrote: > > On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: > >> This fixes a kernel oops when unloading the driver due to usb_put_phy >

Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: > This fixes a kernel oops when unloading the driver due to usb_put_phy > being called after usb_phy_generic_unregister when the device is > detached. Calling usb_phy_generic_unregister causes x->dev->driver to > be NULL in usb_put_phy a

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
On Tue, Oct 10, 2017 at 08:17:34AM +1100, Jonathan Liu wrote: > Hi, > > On 10 October 2017 at 01:23, Bin Liu wrote: > > Hi, > > > > On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: > >> This fixes a kernel oops when unloading the driver due to

Re: [PATCH] usb: musb: Check for host-mode using is_host_active() on reset interrupt

2017-10-09 Thread Bin Liu
Hi, On Wed, Sep 27, 2017 at 08:35:22PM +1000, Jonathan Liu wrote: > The sunxi musb has a bug where sometimes it will generate a babble > error on device disconnect instead of a disconnect IRQ. When this > happens the musb controller switches from host mode to device mode > (it clears MUSB_DEVCTL_H

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
Hi, On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: > This fixes a kernel oops when unloading the driver due to usb_put_phy > being called after usb_phy_generic_unregister when the device is > detached. Calling usb_phy_generic_unregister causes x->dev->driver to > be NULL in usb_put_

Re: [PATCH] usb: musb: compress return logic into one line

2017-06-21 Thread Bin Liu
l take it for v4.14. Acked-by: Bin Liu Regards, -Bin. > --- > drivers/usb/musb/musb_host.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c > index dbe617a..76decb8 100644 > ---

Re: [PATCH v4 0/9] usb: musb: tusb6010_omap: Convert to DMAengine

2017-05-30 Thread Bin Liu
On Thu, May 18, 2017 at 04:11:58PM +0300, Peter Ujfalusi wrote: > Hi, > > Changes since v3: > - typos in commit message of patch 3 and 5 fixed > - long line fixed in patch 5 > - Ack from Vinod is added to the first patch > - The series depends on: http://marc.info/?l=linux-omap&m=149459699415599&w

Re: [PATCH v3 5/9] usb: musb: tusb6010_omap: Create new struct for DMA data/parameters

2017-05-17 Thread Bin Liu
On Fri, May 12, 2017 at 04:57:48PM +0300, Peter Ujfalusi wrote: > For the DMA we have ch (channel), dmareq and sync_dev parameters both > within the tusb_omap_dma_ch and tusb_omap_dma_ch struct. one of the two "tusb_omap_dma_ch" should be "tusb_omap_dma". Regards, -Bin.

Re: [PATCH v3 5/9] usb: musb: tusb6010_omap: Create new struct for DMA data/parameters

2017-05-17 Thread Bin Liu
On Fri, May 12, 2017 at 04:57:48PM +0300, Peter Ujfalusi wrote: > For the DMA we have ch (channel), dmareq and sync_dev parameters both > within the tusb_omap_dma_ch and tusb_omap_dma_ch struct. > By creating a common struct the code can be simplified when selecting > between the shared or multicha

Re: [PATCH v3 3/9] usb: musb: tusb6010: Add MUSB_G_NO_SKB_RESERVE to quirks

2017-05-17 Thread Bin Liu
On Fri, May 12, 2017 at 04:57:46PM +0300, Peter Ujfalusi wrote: > When using the g_ncm for networking this flag will make sure that the > buffer is alligned to 32bit so the DMA can be used to offload the data s/alligned/aligned/ Regards, -Bin. > movement. > > Signed-off-by: Peter Ujfalusi > Te

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-15 Thread Bin Liu
On Mon, May 15, 2017 at 09:07:10AM +0200, Moreno Bartalucci wrote: > > > Il giorno 12 mag 2017, alle ore 17:21, Bin Liu ha scritto: > > > > […] > > > > Moreno, would you mind to test the patch below with your modem? > > > > […] > >> &g

Re: [PATCH] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-12 Thread Bin Liu
On Fri, May 12, 2017 at 04:48:48PM +0300, Peter Ujfalusi wrote: > We have one register for each EP to set the maximum packet size for both > TX and RX. > If for example an RX programming would happen before the previous TX > transfer finishes we would reset the TX packet side. > > To fix this issu

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-12 Thread Bin Liu
On Fri, May 12, 2017 at 10:21:35AM -0700, Tony Lindgren wrote: > * Bin Liu [170512 08:24]: > > On Fri, May 12, 2017 at 07:58:49AM -0700, Tony Lindgren wrote: > > > OK. No better ideas except I think we should probably have a separate > > > timer for keeping VBUS on aft

Re: [PATCH] usb-musb: keep VBUS on when device is disconnected

2017-05-12 Thread Bin Liu
On Fri, May 12, 2017 at 07:58:49AM -0700, Tony Lindgren wrote: > * Bin Liu [170512 06:43]: > > On Thu, May 11, 2017 at 02:06:28PM -0700, Tony Lindgren wrote: > > > > > > Well maybe the minimal fix for now is just pretty much back to > > > square one of this

  1   2   3   >