[PATCH] net: ethernet: fix kernel OOPS when remove davinci_mdio module

2012-08-30 Thread Bin Liu
davinci mdio device is not unregistered from mdiobus when removing the module, which causes BUG_ON() when free the device from mdiobus. Calling mdiobus_unregister() before mdiobus_free() fixes the issue. Signed-off-by: Bin Liu --- drivers/net/ethernet/ti/davinci_mdio.c |4 +++- 1 files

Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode

2013-08-14 Thread Bin Liu
Sebastian, On Wed, Aug 14, 2013 at 1:17 PM, Sebastian Andrzej Siewior wrote: > So I tried to boot my beagle bone board to figure out if they use the > first or the second port in host mode (but it doesn't boot). The tiny > micro USB plug is 100% for UART and not wired up to MUSB. I have not run

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 3:35 PM, Sebastian Andrzej Siewior wrote: >> My build server is down this afternoon. Once it comes back next week, >> I will try 3.8 again, to see how I can help on this USB1 host mode >> issue. its devctl register should stay on 0x19 even nothing is >> connecte

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 11:53 AM, Sebastian Andrzej Siewior wrote: > So you say, am335x-evm is not able to run OTG mode and may only run in > host mode and as a consequence it must not call musb_platform_try_idle() > because it throws that one bit away and there is no way to bring it b

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-29 Thread Bin Liu
Sebastian, On Mon, Jul 29, 2013 at 12:51 PM, Sebastian Andrzej Siewior wrote: > On 07/29/2013 07:26 PM, Bin Liu wrote: >> Sebastian, > > Hi Bin, > >> I did not say AM335xEVM is not able to run OTG mode. The problem is in >> OTG mode the SESSION bit will be cleare

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-23 Thread Bin Liu
Hi Sebastian, On Tue, Jul 23, 2013 at 12:31 PM, Sebastian Andrzej Siewior wrote: > > On 07/23/2013 07:28 PM, Bin Liu wrote: > > Hi, > > Hi, > > > > > On Mon, Jul 22, 2013 at 1:10 PM, Sebastian Andrzej Siewior > > mailto:bige...@linutronix.de&g

Re: [PATCH 06/16] usb: musb: dsps: rename ti81xx_driver_data to am33xx_driver_data

2013-07-23 Thread Bin Liu
(re-send, due to last delivery failure to the mailing list...) On Tue, Jul 23, 2013 at 1:23 PM, Bin Liu wrote: > Hi Sebastian, > > On Mon, Jul 22, 2013 at 1:09 PM, Sebastian Andrzej Siewior > wrote: >> >> This patch renames the type struct from ti81xx_driver_data to >

Re: [PATCH 06/16] usb: musb: dsps: rename ti81xx_driver_data to am33xx_driver_data

2013-07-25 Thread Bin Liu
Sebastian, On Thu, Jul 25, 2013 at 9:41 AM, Sebastian Andrzej Siewior wrote: > * Bin Liu | 2013-07-23 13:23:57 [-0500]: > >>Hi Sebastian, > Hi Liu, > >>On Mon, Jul 22, 2013 at 1:09 PM, Sebastian Andrzej Siewior < >>bige...@linutronix.de> wrote: >> &

Re: [PATCH 06/16] usb: musb: dsps: rename ti81xx_driver_data to am33xx_driver_data

2013-07-25 Thread Bin Liu
Sebastian, On Thu, Jul 25, 2013 at 10:16 AM, Sebastian Andrzej Siewior wrote: > On 07/25/2013 05:12 PM, Bin Liu wrote: >> Sebastian, > > Hi Bin, > >>> Is it really there or was it never there and it has been added to TRM by >>> accident? >> The EOI regis

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior wrote: > * Bin Liu | 2013-07-23 13:55:27 [-0500]: > >>Hi Sebastian, > Hi Bin, > >>either by SRP or HNP, or something else. In TI 3.2 kernel, there is >>workaround in otg_timer() to _toggle_ t

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
On Fri, Jul 26, 2013 at 12:53 PM, Bin Liu wrote: > Sebastian, > > On Fri, Jul 26, 2013 at 11:31 AM, Sebastian Andrzej Siewior > wrote: >> * Bin Liu | 2013-07-23 13:55:27 [-0500]: >> >>>Hi Sebastian, >> Hi Bin, >> >>>either by SRP

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 1:22 PM, Sebastian Andrzej Siewior wrote: > On 07/26/2013 08:17 PM, Bin Liu wrote: > > Hi Bin. > >>> In TI 3.2 kernel, the otg_timer() toggles the SESSION bit in >>> OTG_STATE_B_IDLE state. So whenever the ID pin is grounded b

Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

2013-07-26 Thread Bin Liu
Sebastian, On Fri, Jul 26, 2013 at 2:55 PM, Sebastian Andrzej Siewior wrote: > The bit is removed in otg_timer() because the phy gets into > OTG_STATE_A_WAIT_BCON. > > Now, this is current HEAD + my stuff to get second port working. I > downloaded v3.2 and browsed as I was looking for the workaro

Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode

2013-08-13 Thread Bin Liu
Sebastian, On Tue, Aug 13, 2013 at 2:14 AM, Sebastian Andrzej Siewior wrote: > On 08/09/2013 10:30 PM, Sergei Shtylyov wrote: >> Hello. > > Hi Sergei, > >>> +if (musb->port_mode == MUSB_PORT_MODE_HOST) { >>> +val = USBMODE_IDDIG_A; >>> +val |= USBMODE_ID_MUX_REG; >> >>Why

Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode

2013-08-13 Thread Bin Liu
Sebastian, On Tue, Aug 13, 2013 at 8:17 AM, Sebastian Andrzej Siewior wrote: > On 08/13/2013 03:03 PM, Bin Liu wrote: >> Sebastian, > > Hi Bin, > >>>>> +if (musb->port_mode == MUSB_PORT_MODE_HOST) { >>>>> +val = USBMODE_IDDIG_A; >

Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode

2013-08-13 Thread Bin Liu
Sebastian, On Tue, Aug 13, 2013 at 8:44 AM, Sebastian Andrzej Siewior wrote: > This was a misunderstanding then. Sorry. I understood that the bin has > to be unset and then the controller set it once a device there. You meant ID pin? I think it should be set all the time since the driver initiali

Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode

2013-08-13 Thread Bin Liu
Sebastian, On Tue, Aug 13, 2013 at 9:23 AM, Sebastian Andrzej Siewior wrote: > Where is my memory going? So now I have a beagle bone in front of me > and I see a micro USB port a standard A connector. My memory was > different. > The micro USB is the UART and standard is most likely the first mus

Re: [PATCH] usb: musb: fix error handling message in probe

2016-09-21 Thread Bin Liu
Hi, On Sat, Sep 17, 2016 at 12:21:25AM +0200, Arnd Bergmann wrote: > We print an error message when platform_device_register_full() > fails, but the initialization of the argument has been removed, > as shown in this warning: > > drivers/usb/musb/da8xx.c: In function 'da8xx_probe': > drivers/usb/

Re: [PATCH v6 2/3] usb: musb: da8xx: Use devm in probe

2016-09-06 Thread Bin Liu
Hi, On Mon, Sep 05, 2016 at 03:00:32PM -0500, David Lechner wrote: > Simplify things a bit by using devm functions where possible. > > Signed-off-by: David Lechner > --- > drivers/usb/musb/da8xx.c | 19 +-- > 1 file changed, 5 insertions(+), 14 deletions(-) > > diff --git a/dri

Re: [PATCH v6 0/3] da8xx USB PHY platform devices and clocks

2016-09-06 Thread Bin Liu
Hi Greg and Alan, On Mon, Sep 05, 2016 at 03:00:30PM -0500, David Lechner wrote: > Just resending to get these merged into usb. The phy parts of this patch > series > have already been merged into Linus' tree. > > I have rebased on 4.8-rc5 but there have not been any changes to these since > the

Re: drivers/usb/musb/tusb6010.c:142:21: error: 'USB_INDEX' undeclared

2016-09-08 Thread Bin Liu
Hi Tony, On Thu, Sep 08, 2016 at 10:45:21AM -0700, Tony Lindgren wrote: > Hi, > > Adding Bin to Cc. > > * kbuild test robot [160611 13:27]: > > Hi, > > > > FYI, the error/warning still remains. > > Sorry just noticed this going through my inbox.. Please let me know > if there are other pendin

Re: drivers/usb/musb/tusb6010.c:142:21: error: 'USB_INDEX' undeclared

2016-09-14 Thread Bin Liu
On Tue, Sep 13, 2016 at 03:35:05PM -0700, Tony Lindgren wrote: > * Bin Liu [160908 11:26]: > > On Thu, Sep 08, 2016 at 10:45:21AM -0700, Tony Lindgren wrote: > > > --- a/drivers/usb/musb/Kconfig > > > +++ b/drivers/usb/musb/Kconfig > > > @@ -87,7 +87,7 @@

Re: drivers/usb/musb/tusb6010.c:142:21: error: 'USB_INDEX' undeclared

2016-09-14 Thread Bin Liu
H] usb: musb: Fix tusb6010 compile error on blackfin > > We have CONFIG_BLACKFIN ifdef redefining all musb registers in > musb_regs.h and tusb6010.h is never included causing a build > error with blackfin-allmodconfig and COMPILE_TEST. > > Let's fix the issue by not bui

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 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-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 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] 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] 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_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: 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: [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: &

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: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 09:19:17AM +0300, Peter Ujfalusi wrote: > > > On 2017-05-11 02:16, Joe Perches wrote: > >On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote: > >>On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: > >>>We have one register f

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

2017-05-11 Thread Bin Liu
On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > * Bin Liu [170327 10:17]: > > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote: > > > * Moreno Bartalucci [170327 09:23]: > > > > If I understood your patch, however, if the device (an

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

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 11:55:28AM -0700, Tony Lindgren wrote: > * Bin Liu [170511 11:53]: > > On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > > > * Bin Liu [170327 10:17]: > > > > On Mon, Mar 27, 2017 at 09:59:47AM -0700, Tony Lindgren wrote:

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

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 02:01:00PM -0500, Bin Liu wrote: > On Thu, May 11, 2017 at 11:55:28AM -0700, Tony Lindgren wrote: > > * Bin Liu [170511 11:53]: > > > On Mon, Mar 27, 2017 at 10:55:37AM -0700, Tony Lindgren wrote: > > > > * Bin Liu [170327 10:17]: > >

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

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 02:10:05PM -0500, Bin Liu wrote: [...] > > > > The otg state machine implementation in the musb drivers are kind of > > > > strange. > > > > OTG_STATE_A_WAIT_BCON suppose to be a steady state when no usb device is > > >

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

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 12:38:11PM -0700, Tony Lindgren wrote: > * Bin Liu [170511 12:23]: > > On Thu, May 11, 2017 at 02:10:05PM -0500, Bin Liu wrote: > > [...] > > > > > > The otg state machine implementation in the musb drivers

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

2017-05-11 Thread Bin Liu
On Thu, May 11, 2017 at 01:23:06PM -0700, Tony Lindgren wrote: > * Bin Liu [170511 13:05]: > > On Thu, May 11, 2017 at 12:38:11PM -0700, Tony Lindgren wrote: > > > > > > I wonder if just keeping VBUS on longer in OTG_STATE_A_WAIT_BCON > > > solves th

Re: [PATCH v2 05/10] 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 09:53:55AM +0300, Peter Ujfalusi wrote: > Bin, > > On 2017-05-11 17:12, Bin Liu wrote: > >>which is valid. > > > >So will you update the patch to move the declaration to the beginning of > >the function to avoid this WARNING. I would

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

2017-05-12 Thread Bin Liu
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 thread. This should keep VBUS always on. > Then we can figure out some logic to cut VBUS later on. > > And yeah, the state machine is really hard

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

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

[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 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: [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: 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: 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: [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: [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: [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: [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
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-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 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 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 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 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 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 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] 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 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 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 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] 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 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: 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 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: 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] 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 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 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] 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 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] 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] 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 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: 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] 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
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: 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
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: 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 0/5] Add support for SW babble Control

2014-05-19 Thread Bin Liu
Hi George, On Mon, May 19, 2014 at 3:40 AM, George Cherian wrote: > Hi Bin, > > > On 5/15/2014 8:49 PM, Bin Liu wrote: >> >> George, >> >> On Thu, May 15, 2014 at 1:28 AM, George Cherian >> wrote: >>> >>> Hi Bin, >>> >>

Re: [PATCH v4 1/6] usb: musb: core: Handle Babble condition only in HOST mode

2014-05-19 Thread Bin Liu
Hi, On Mon, May 19, 2014 at 8:39 AM, George Cherian wrote: > BABBLE and RESET share the same interrupt. The interrupt > is considered to be RESET if MUSB is in peripheral mode and > as a BABBLE if MUSB is in HOST mode. > > Handle babble condition iff MUSB is in HOST mode. > > Signed-off-by: Georg

Re: [PATCH v4 4/6] usb: musb: core: Convert the musb_platform_reset to have a return value.

2014-05-19 Thread Bin Liu
Hi, On Mon, May 19, 2014 at 8:39 AM, George Cherian wrote: > Currently musb_platform_reset() is only used by dsps. > In case of BABBLE interrupt for other platforms the musb_platform_reset() > is a NOP. In such situations no need to re-initialize the endpoints. > Also in the latest silicon revis

Re: [PATCH v3 0/5] Add support for SW babble Control

2014-05-13 Thread Bin Liu
Hi, On Tue, May 13, 2014 at 8:24 AM, George Cherian wrote: > Hi Daniel, > > > On 5/13/2014 6:44 PM, Daniel Mack wrote: >> >> Hi George, >> >> On 05/13/2014 02:57 PM, George Cherian wrote: >>> >>> I never enabled the MUSB_BABBLE_SW_SESSION_CTRL in the MUSB_BABBLE_CTL >>> reg. >>> can you try with

Re: [PATCH v3 0/5] Add support for SW babble Control

2014-05-14 Thread Bin Liu
George, On Wed, May 14, 2014 at 12:37 AM, George Cherian wrote: > On 5/14/2014 12:07 AM, Bin Liu wrote: >> >> Hi, >> >> On Tue, May 13, 2014 at 8:24 AM, George Cherian >> wrote: >>> >>> Hi Daniel, >>> >>> >>> On 5/13

Re: [PATCH v3 0/5] Add support for SW babble Control

2014-05-14 Thread Bin Liu
George, On Wed, May 14, 2014 at 9:34 AM, Bin Liu wrote: > George, > > On Wed, May 14, 2014 at 12:37 AM, George Cherian > wrote: >> On 5/14/2014 12:07 AM, Bin Liu wrote: >>> >>> Hi, >>> >>> On Tue, May 13, 2014 at 8:24 AM, George Cherian

Re: [PATCH v3 0/5] Add support for SW babble Control

2014-05-15 Thread Bin Liu
George, On Thu, May 15, 2014 at 1:28 AM, George Cherian wrote: > Hi Bin, > > > On 5/14/2014 10:13 PM, Bin Liu wrote: >> >> George, >> >> On Wed, May 14, 2014 at 9:34 AM, Bin Liu wrote: >>> >>> George, >>> >>> On Wed, May 14

Re: [PATCH 1/4] usb: move the OTG state from the USB PHY to the OTG structure

2014-07-22 Thread Bin Liu
Hi, On Wed, Jul 9, 2014 at 5:17 AM, Antoine Ténart wrote: > Before using the PHY framework instead of the USB PHY one, we need to > move the OTG state into another place, since it won't be available when > USB PHY isn't used. This patch moves the OTG state into the OTG > structure, and makes all

Re: [PATCH v4 1/6] usb: musb: core: Handle Babble condition only in HOST mode

2014-05-22 Thread Bin Liu
Hi George, On Mon, May 19, 2014 at 11:32 PM, George Cherian wrote: > Hi Bin, > > On 5/19/2014 9:24 PM, Bin Liu wrote: >> >> Hi, >> >> On Mon, May 19, 2014 at 8:39 AM, George Cherian >> wrote: >>> >>> BABBLE and RESET share the same inter

Re: [PATCH v6 0/5] Add support for SW babble Control

2014-06-03 Thread Bin Liu
t value read is 0x4 and > for older versions its 0x0. Please add 'Tested-by: Bin Liu ' to this series. Thanks, -Bin. > > Patch 1 -> Handle Babble only if MUSB is in HOST mode > Patch 2 -> Convert recover work to delayed work. > Patch 3 -> usb_phy_vbus_(off/_o

Re: USB_MUSB_DA8XX with g_multi.ko

2014-06-25 Thread Bin Liu
Hi, On Wed, Jun 25, 2014 at 10:13 AM, Jon Ringle wrote: > In commit 787f5627bec80094db487bfcb401e9744f181aed > usb: musb: make davinci and da8xx glues depend on BROKEN > > USB_MUSB_DA8XX was marked as BROKEN > > A few months ago, we updated the linux kernel on our AM1808 SoC based > embedded boar

Re: [PATCH] usb: musb: Fix module autoload for OF platform driver

2015-08-27 Thread Bin Liu
Hi, On Thu, Aug 27, 2015 at 10:07 AM, Luis de Bethencourt wrote: > This platform driver has a OF device ID table but the OF module > alias information is not created so module autoloading won't work. Care to add 'ux500' to the summary line - 'usb: musb: ux500: Fix...'? That helps filtering in gi

  1   2   3   >