Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-12-06 Thread Bin Liu
Peter, On Wed, Nov 28, 2018 at 01:16:32PM +0200, Peter Ujfalusi wrote: > Hi, > > On 28/11/2018 13.15, Peter Ujfalusi wrote: > > forgot to fix up Vinod's email address. > > > > > > > On 12/11/2018 17.40, Bin Liu wrote: > > > > Can you fix

[PATCH] usb: musb: dsps: fix otg state machine

2018-12-03 Thread Bin Liu
as a transient state, then move the state to either a_wait_bcon for host port or a_idle state for dual-role port, if no usb device is attached to the port. Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-26 Thread Bin Liu
Hi, On Sat, Nov 24, 2018 at 07:58:03PM +0530, Vinod Koul wrote: > On 12-11-18, 09:43, Bin Liu wrote: > > The driver defines three states for a cppi channel. > > - idle: .chan_busy == 0 && not in .pending list > > - pending: .chan_busy == 0 && in .pen

Re: [PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
Sorry, please ignore this. Used incorrect Vinod email address. On Mon, Nov 12, 2018 at 09:40:49AM -0600, Bin Liu wrote: > The driver defines three states for a cppi channel. > - idle: .chan_busy == 0 && not in .pending list > - pending: .chan_busy == 0 && in .pending

[PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
ist will be transitioned to busy state. Removing channels from the .pending list solves the problem. Fixes: 975faaeb9985 ("dma: cppi41: start tear down only if channel is busy") Cc: sta...@vger.kernel.org # v3.15+ Signed-off-by: Bin Liu --- drivers/dma/ti/cppi41.c | 16 +++- 1

[PATCH] dma: cppi41: delete channel from pending list when stop channel

2018-11-12 Thread Bin Liu
ist will be transitioned to busy state. Removing channels from the .pending list solves the problem. Fixes: 975faaeb9985 ("dma: cppi41: start tear down only if channel is busy") Cc: sta...@vger.kernel.org # v3.15+ Signed-off-by: Bin Liu --- drivers/dma/ti/cppi41.c | 16 +++- 1

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-24 Thread Bin Liu
t; > Hi Bin, > > > > > >> Do you know what is the usb throughput required in your test case? for > > >> example image format, resolution, frame rate? Is the usb data transfer > > >> bulk or isoch? > > > Yes, the image format is 640 x 480 >

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-24 Thread Bin Liu
Joel, On Wed, Oct 24, 2018 at 05:31:25PM +0200, Joel Pepper wrote: > Hi Joseph, Hi Bin, > > I am currently investigating a bug with the BeagleBoneBlack (which also > uses the AM335x) and a Logitech Webcam, which might be connected. > > I am using a Logitech C270 and if I set the format to YUYV

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
On Fri, Oct 19, 2018 at 02:26:51PM -0400, Alan Stern wrote: > On Fri, 19 Oct 2018, Bin Liu wrote: > > > On Fri, Oct 19, 2018 at 07:19:17PM +0200, Josep M. Mirats Tur wrote: > > > Hi Bin, > > > > > > I included the following line in the /boot/uEnv

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
On Fri, Oct 19, 2018 at 07:48:20PM +0200, Josep M. Mirats Tur wrote: > Hi, > > Yes, this would be the link: > http://shop-orbbec3d-com.3dcartstores.com/Astra-Mini_p_40.html Okay, It is about $160, a bit more than my bugdet... > In the meanwhile I'll check my application with other board. > >

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
On Fri, Oct 19, 2018 at 07:33:47PM +0200, Josep M. Mirats Tur wrote: > Hi, > > It seems correct, this is the output of sudo cat /proc/cmdline: > console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 > root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait musb_hdrc.use_dma=0 It looks correct. So

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
t_rx 1965: Rx interrupt with no errors or packet! > [ 249.228346] musb_host_rx 1965: Rx interrupt with no errors or packet! > [ 249.238329] musb_host_rx 1965: Rx interrupt with no errors or packet! > [ 249.249025] musb_ep_program 916: broken !rx_reinit, ep2 csr 0003 > On Fri, Oct 19, 2018 at 7:00 P

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
On Fri, Oct 19, 2018 at 06:31:15PM +0200, Josep M. Mirats Tur wrote: > Bin, > > I'm sorry but I cannot find that menuconfig at the Beagle... Never mind, but add the following to your UBoot bootargs env instead to disable dma. musb_hdrc.use_dma=0 Regards, -Bin.

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
On Fri, Oct 19, 2018 at 06:17:31PM +0200, Josep M. Mirats Tur wrote: > Hi Bin, > > I was referring to the output of usbmon I attached in the previous > message (attached again) > > I'm sorry but I do not know how to acces the kernel menuconfig to > disable the MUSB CPPI DMA, how should I do

Re: Error reading USB camera in BeagleBone with ARM Debian

2018-10-19 Thread Bin Liu
Hi, On Fri, Oct 19, 2018 at 05:35:29PM +0200, Josep M. Mirats Tur wrote: > Hi, > > Thanks again for your answer. > > I changed to the newest Debian image available for BeagleBone boards: > The Debian 9.5 - 4.14.71-ti-r80 > I disabled the usb "autosuspend" by issuing the command > echo -1 |

[PATCH 1/1] usb: musb: dsps: do not disable CPPI41 irq in driver teardown

2018-09-17 Thread Bin Liu
in musb_dma_controller_destroy(). Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS") Cc: sta...@vger.kernel.org Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/driver

[PATCH 0/1] musb fixes for v4.19-rc5

2018-09-17 Thread Bin Liu
Hi Greg, Here is one musb fix for v4.19 rc, which fixes the interfering issue among the two musb controllers in dsps glue driver. Please let me know if any change is needed. Regards, -Bin. --- Bin Liu (1): usb: musb: dsps: do not disable CPPI41 irq in driver teardown drivers/usb/musb

Re: musb_hdrc HNP?

2018-09-04 Thread Bin Liu
cable is bad? > [ 1221.073328] usb usb2-port1: unable to enumerate USB device > debian@beaglebone:~/wk-b$ Regards, -Bin. > === > > ________ > From: linux-usb-ow...@vger.kernel.org on > behalf of Takashi Matsuzawa > Sent: Friday

Re: [PATCH v2] usb: musb: gadget: Fix big-endian arch issue

2018-08-27 Thread Bin Liu
Hi, On Fri, Aug 03, 2018 at 09:03:36AM +, Alexey Spirkov wrote: > Existing code is not applicable to big-endian machines > ctrlrequest fields received in USB endian - i.e. in little-endian > and should be converted to cpu endianness before usage. > > Signed-off-by: Alexey Spirkov > --- >

Re: musb_hdrc HNP?

2018-08-27 Thread Bin Liu
ikely to be caused by such, I may try adding ferite beeds, > etc. to my prototype to see if anything change. First you can try to liminate some variables, for example, disable CPPI DMA, disable usb runtime PM. Good luck. Regards, -Bin. > ________ > From:

Re: musb_hdrc HNP?

2018-08-24 Thread Bin Liu
Hi, On Thu, Aug 23, 2018 at 10:06:50PM +, Takashi Matsuzawa wrote: > Hello. > > I am trying HNP (host -> peripheral role change) using two > PocketBeagles, but without success. Well, you are the very first one that I have ever heard who tries to use HNP on musb, at least on musb_dsps. >

[PATCH v2] usb: musb: dsps: do not disable CPPI41 irq in driver teardown

2018-08-23 Thread Bin Liu
in musb_dma_controller_destroy(). Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS") Cc: sta...@vger.kernel.org Signed-off-by: Bin Liu --- v2: revise commit message drivers/usb/musb/musb_dsps.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-)

[PATCH] usb: musb: dsps: do not disable CPPI41 irq in driver teardown

2018-08-21 Thread Bin Liu
in musb_dma_controller_destroy(). Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS") Cc: sta...@vger.kernel.org Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/driver

Re: g_audio regression on dwc3 udc

2018-08-13 Thread Bin Liu
Hi Thinh, On Fri, Aug 10, 2018 at 09:36:30PM +, Thinh Nguyen wrote: > Hi Bin, > > On 8/10/2018 12:05 PM, Bin Liu wrote: > > Hi Felipe, > > > > I noticed a regression on g_audio (uac2) with dwc3 udc on v4.14: > > > > - nosound in playback > > - pla

g_audio regression on dwc3 udc

2018-08-10 Thread Bin Liu
Hi Felipe, I noticed a regression on g_audio (uac2) with dwc3 udc on v4.14: - nosound in playback - playback can only play once, the following error happens from the 2nd playback aplay: set_params:1361: Unable to install hw params: A manual bisect tells the two issues are seperate and the

Re: [PATCH] Fix memory issue in non-DMA mode for MUSB gadget

2018-08-03 Thread Bin Liu
t; > -Original Message- > From: Bin Liu > Sent: Thursday, August 2, 2018 7:15 PM > To: Alexey Spirkov > Cc: Greg Kroah-Hartman ; > linux-usb@vger.kernel.org; and...@ncrmnt.org > Subject: Re: [PATCH] Fix memory issue in non-DMA mode for MUSB gadget > > Hi, > &

Re: [PATCH] Fix big-endian application issue for MUSB gadget

2018-08-02 Thread Bin Liu
On Thu, Aug 02, 2018 at 11:44:00AM -0500, Bin Liu wrote: > Hi, > > On Thu, Jul 26, 2018 at 12:52:53PM +, Alexey Spirkov wrote: > > Existing code is not applicable to big-endian machines > > ctrlrequest fields received in USB endian - i.e. in little-endian > > and

Re: [PATCH] Fix memory issue in non-DMA mode for MUSB gadget

2018-08-02 Thread Bin Liu
On Thu, Aug 02, 2018 at 11:14:32AM -0500, Bin Liu wrote: > Hi, > > On Thu, Jul 26, 2018 at 12:52:57PM +, Alexey Spirkov wrote: > > dma_mapping_error function unable to works in PowerPC arch > > when MUSB do not use DMA (illegal memory access). Proposed > > patch

Re: [PATCH] Fix big-endian application issue for MUSB gadget

2018-08-02 Thread Bin Liu
Hi, On Thu, Jul 26, 2018 at 12:52:53PM +, Alexey Spirkov wrote: > Existing code is not applicable to big-endian machines > ctrlrequest fields received in USB endian - i.e. in little-endian > and should be converted to cpu endianness before usage. > > Signed-off-by: Alexey Spirkov > --- >

Re: [PATCH] Fix memory issue in non-DMA mode for MUSB gadget

2018-08-02 Thread Bin Liu
Hi, On Thu, Jul 26, 2018 at 12:52:57PM +, Alexey Spirkov wrote: > dma_mapping_error function unable to works in PowerPC arch > when MUSB do not use DMA (illegal memory access). Proposed > patch replace its usage to usual define for checking DMA mapping. > > Signed-off-by: Alexey Spirkov >

[PATCH] usb: core: handle hub C_PORT_OVER_CURRENT condition

2018-07-19 Thread Bin Liu
state and C_PORT_OVER_CURRENT is set for the port, but PORT_OVER_CURRENT is not set." so let's check C_PORT_OVER_CURRENT too for over current condition. Fixes: 08d1dec6f405 ("usb:hub set hub->change_bits when over-current happens") Cc: Tested-by: Alessandro Antenucci Signed-off-by: Bin Liu

Re: usb hub driver bug in overcurrent handling?

2018-07-18 Thread Bin Liu
On Fri, Jul 13, 2018 at 04:35:33PM -0400, Alan Stern wrote: > On Fri, 13 Jul 2018, Bin Liu wrote: > > > Hi, > > > > I got a report saying that when overcurrent happens in one of the hub > > downstream ports, USB_PORT_STAT_OVERCURRENT is not

Re: usb hub driver bug in overcurrent handling?

2018-07-13 Thread Bin Liu
On Fri, Jul 13, 2018 at 02:22:32PM -0500, Bin Liu wrote: > Hi, > > I got a report saying that when overcurrent happens in one of the hub > downstream ports, USB_PORT_STAT_OVERCURRENT is not set in portstatus, > instead USB_PORT_STAT_C_OVERCURRENT is set in portchange, then th

usb hub driver bug in overcurrent handling?

2018-07-13 Thread Bin Liu
Hi, I got a report saying that when overcurrent happens in one of the hub downstream ports, USB_PORT_STAT_OVERCURRENT is not set in portstatus, instead USB_PORT_STAT_C_OVERCURRENT is set in portchange, then the overcurrent condition is not handled in hub_event(). The following patch solves the

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-05-25 Thread Bin Liu
Hi laurent, On Thu, May 24, 2018 at 10:59:18PM +0300, Laurent Pinchart wrote: > Hi Felipe, > > On Friday, 20 April 2018 13:57:23 EEST Felipe Balbi wrote: > > Bin Liu <b-...@ti.com> writes: > > >> Felipe Balbi <felipe.ba...@linux.intel.com> writes:

[PATCH 09/14] usb: musb: break the huge isr musb_stage0_irq() into small functions

2018-05-21 Thread Bin Liu
musb_stage0_irq() is 400+ lines long. Break its interrupt events handling into each individual functions to make it easy to read. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 730 +++ 1 file changed, 384 insertions(+

[PATCH 07/14] usb: musb: remove duplicated port mode enum

2018-05-21 Thread Bin Liu
include/linux/usb/musb.h already defines enum for musb port mode, so remove the duplicate in musb_core.h and use the definition in musb.h. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c| 8 drivers/usb/musb/musb_core.h| 8 +--- drivers/us

[PATCH 08/14] usb: musb: remove unused members in struct musb_hdrc_config

2018-05-21 Thread Bin Liu
The following members in struct musb_hdrc_config are not used, so remove them. soft_con utm_16 big_endian mult_bulk_tx mult_bulk_rx high_iso_tx high_iso_rx dma dma_channels dyn_fifo_size vendor_ctrl vendor_stat vendor_req dma_req_chan musb_hdrc_eps_bits Signed-off-by: Bin Liu <b-...@ti.

[PATCH 13/14] usb: musb: gadget: fix to_musb_request() to not return NULL

2018-05-21 Thread Bin Liu
tools. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.h b/drivers/usb/musb/musb_gadget.h index 9c34aca06db6..466877b471ef 100644 --- a/drivers/usb/musb/musb_gadget.h

[PATCH 06/14] usb: musb: dsps: remove duplicated get_musb_port_mode()

2018-05-21 Thread Bin Liu
musb_core already has musb_get_mode(), so remove the duplicate from musb_dsps.c. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_dsps.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/us

[PATCH 12/14] USB: musb: dsps: propagate device-tree node

2018-05-21 Thread Bin Liu
eneric phys. Also note that the other glue drivers will require similar changes to be able to describe their buses in DT. Signed-off-by: Johan Hovold <jo...@kernel.org> Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_dsps.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH 03/14] usb: musb: remove adjust_channel_params() callback from musb_platform_ops

2018-05-21 Thread Bin Liu
Now Blackfin support is removed, nobody uses adjust_channel_params() any more, so remove it from struct musb_platform_ops. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.h | 4 drivers/usb/musb/musbhsdma.c | 8 2 files changed, 12 deletions(-) diff

[PATCH 01/14] usb: musb: merge musbhsdma.h into musbhsdma.c

2018-05-21 Thread Bin Liu
Now Blackfin support is removed, header musbhsdma.h is only included in musbhsdma.c. So let's merge the content in musbhsdma.h to musbhsdma.c and delete musbhsdma.h. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musbhsdma.c | 66 +++- drive

[PATCH 11/14] usb: musb: disable otg protocol support

2018-05-21 Thread Bin Liu
.html Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.c | 5 + drivers/usb/musb/musb_host.c | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 5b8e6297ebed..eae8b1b1b45b

[PATCH 14/14] usb: musb: gadget: fix to_musb_ep() to not return NULL

2018-05-21 Thread Bin Liu
UDC core ensures the usb_ep parameter passed in is not NULL, so checking if (ep != NULL) is pointless. Convert to_musb_ep() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_ga

[PATCH 04/14] usb: musb: remove some register access wrapper functions

2018-05-21 Thread Bin Liu
musb_write_ulpi_buscontrol musb_read_txfifosz musb_read_txfifoadd musb_read_rxfifosz musb_read_rxfifoadd musb_read_ulpi_buscontrol musb_read_hwvers Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 42 - drive

[PATCH 00/14] musb patches for v4.18-rc1

2018-05-21 Thread Bin Liu
Hi Greg, Here are the musb patches for v4.18 rc1, mainly cleaning up the drivers after BLACKFIN arch support is deleted, also having one patch from Johan to prepare the USB PHY framework further work. Please let me know if any change is needed. Regards, -Bin. Bin Liu (13): usb: musb

[PATCH 05/14] usb: musb: remove duplicated quirks flag

2018-05-21 Thread Bin Liu
Both musb_io and musb_platform_ops in struct musb define a quirks flag for the same purpose. Let's remove the one in struct musb_io, and use that in struct musb_platform_ops instead. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 10 -- drivers/us

[PATCH 02/14] usb: musb: remove readl/writel from struct musb_platform_ops

2018-05-21 Thread Bin Liu
Now Blackfin support is removed, we no longer need function pointers for musb_readl() and musb_writel(). Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 34 -- drivers/usb/musb/musb_core.h | 4 drivers/usb/musb/musb_io.h

[PATCH 10/14] usb: musb: remove references to default_a of struct usb_otg

2018-05-21 Thread Bin Liu
musb drivers do not use the otg fsm framework, so referencing to otg->default_a doesn't have any effect, so remove the references. But tusb6010 glue driver uses it locally to control the vbus power, so keep the references in tusb6010 only. Signed-off-by: Bin Liu <b-...@ti.com> --- dr

Re: Pandaboard OMAP4 MUSB short packet hang on UVC gadget

2018-05-16 Thread Bin Liu
Hi, On Tue, May 15, 2018 at 10:58:16PM +0100, Kieran Bingham wrote: > Hi Bin, Felipe, > > We have been trying to get a UVC gadget operational on the Pandaboard ES > platform, and we believe we've hit an issue with short packets on the MUSB in > DMA mode. I don't have a Pandaboard. Does it use

[PATCH] musb fixes for v4.17-rc6

2018-05-14 Thread Bin Liu
Hi Greg, Here is one musb fix for v4.17-rc6, which fixes a race condition in musb transitioning from resume to suspend. Please let me know if any change is needed. Regards, -Bin. Daniel Glöckner (1): usb: musb: fix remote wakeup racing with suspend drivers/usb/musb/musb_host.c| 5

[PATCH] usb: musb: fix remote wakeup racing with suspend

2018-05-14 Thread Bin Liu
wakeup is signalled and thus avoids to reset the RESUME bit. Ignoring this error when musb_port_suspend is called from musb_hub_control is ok. Signed-off-by: Daniel Glöckner <d...@emlix.com> Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_host.c| 5 -

Re: [PATCH v2] musb: fix remote wakeup racing with suspend

2018-05-11 Thread Bin Liu
Hi, On Thu, May 03, 2018 at 04:43:25PM +0200, Daniel Glöckner wrote: > It has been observed that writing 0xF2 to the power register while it > reads as 0xF4 results in the register having the value 0xF0, i.e. clearing > RESUME and setting SUSPENDM in one go does not work. It might also violate >

Re: [PATCH] musb: fix remote wakeup racing with suspend

2018-05-02 Thread Bin Liu
On Wed, May 02, 2018 at 03:12:16AM +0200, Daniel Glöckner wrote: > Hi, > > On Tue, May 01, 2018 at 08:48:11AM -0500, Bin Liu wrote: > > On Fri, Apr 27, 2018 at 03:00:05PM +0200, Daniel Glöckner wrote: > > > It has been observed that writing 0xF2 to the power register whil

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] musb: fix remote wakeup racing with suspend

2018-05-01 Thread Bin Liu
Hi, On Fri, Apr 27, 2018 at 03:00:05PM +0200, Daniel Glöckner wrote: > It has been observed that writing 0xF2 to the power register while it > reads as 0xF4 results in the register having the value 0xF0, i.e. clearing > RESUME and setting SUSPENDM in one go does not work. It might also violate >

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 1/2] usb: musb: host: fix potential NULL pointer dereference

2018-04-30 Thread Bin Liu
On Mon, Apr 30, 2018 at 11:24:48AM -0700, Greg Kroah-Hartman wrote: > On Mon, Apr 30, 2018 at 01:11:34PM -0500, Bin Liu wrote: > > On Mon, Apr 30, 2018 at 09:42:15AM -0700, Greg Kroah-Hartman wrote: > > > On Mon, Apr 30, 2018 at 11:20:53AM -0500, Bin Liu wrote: > > >

Re: [PATCH 1/2] usb: musb: host: fix potential NULL pointer dereference

2018-04-30 Thread Bin Liu
On Mon, Apr 30, 2018 at 09:42:15AM -0700, Greg Kroah-Hartman wrote: > On Mon, Apr 30, 2018 at 11:20:53AM -0500, Bin Liu wrote: > > musb_start_urb() doesn't check the pass-in parameter if it is NULL. But > > in musb_bulk_nak_timeout() the parameter passed to musb_start_urb() is &g

[PATCH 1/2] usb: musb: host: fix potential NULL pointer dereference

2018-04-30 Thread Bin Liu
dereference. Fixes: f283862f3b5cb("usb: musb: NAK timeout scheme on bulk TX endpoint") Cc: sta...@vger.kernel.org # v3.7+ Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_

[PATCH 2/2] usb: musb: trace: fix NULL pointer dereference in musb_g_tx()

2018-04-30 Thread Bin Liu
: fc78003e5345a("usb: musb: gadget: add usb-request tracepoints") Cc: sta...@vger.kernel.org # v4.8+ Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/mu

[PATCH 0/2] musb fixes for v4.17-rc4

2018-04-30 Thread Bin Liu
Hi Greg, Here are musb fixes for v4.17-rc4 to fix two NULL pointer dereference cases. Please let me know if any change is needed. Regards, -Bin. Bin Liu (2): usb: musb: host: fix potential NULL pointer dereference usb: musb: trace: fix NULL pointer dereference in musb_g_tx() drivers

Re: [PATCH 1/3] usb: musb: gadget: fix to_musb_request() to not return NULL

2018-04-26 Thread Bin Liu
On Thu, Apr 26, 2018 at 11:25:16AM +0530, Sekhar Nori wrote: > On Thursday 26 April 2018 11:23 AM, Sekhar Nori wrote: > > On Thursday 19 April 2018 01:35 AM, Bin Liu wrote: > >> The gadget function drivers should ensure the usb_request parameter > >> passed in is not N

[PATCH 3/3] usb: musb: host: fix potential NULL pointer dereference

2018-04-26 Thread Bin Liu
dereference. Signed-off-by: Bin Liu <b-...@ti.com> --- v2: no changes. drivers/usb/musb/musb_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index e50438ae241e..218aadef5bbf 100644 --- a/drivers/us

[PATCH v2 2/3] usb: musb: gadget: fix to_musb_ep() to not return NULL

2018-04-26 Thread Bin Liu
UDC core ensures the usb_ep parameter passed in is not NULL, so checking if (ep != NULL) is pointless. Convert to_musb_ep() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-...@ti.com> --- v2: revised the paren

[PATCH v2 1/3] usb: musb: gadget: fix to_musb_request() to not return NULL

2018-04-26 Thread Bin Liu
tools. Signed-off-by: Bin Liu <b-...@ti.com> --- v2: revised the parentheses. drivers/usb/musb/musb_gadget.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.h b/drivers/usb/musb/musb_gadget.h index 9c34aca06db6..06d60848337f 100644 --- a/d

[PATCH 1/3] usb: musb: fix enumeration after resume

2018-04-23 Thread Bin Liu
interrupts on suspend, enable them on resume") Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Andreas Kemnade <andr...@kemnade.info> Tested-by: Tony Lindgren <t...@atomide.com> Signed-off-by: Bin Liu <b-...@ti.com> Signed-off-by: Greg Kroah-Hartman <gre...@linux

[PATCH 3/3] usb: musb: Fix external abort in musb_remove on omap2430

2018-04-23 Thread Bin Liu
# v4.9+ Signed-off-by: Merlijn Wajer <merl...@wizzup.org> Signed-off-by: Bin Liu <b-...@ti.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_c

[PATCH 0/3] musb fixes backport to v4.9+

2018-04-23 Thread Bin Liu
Hi, Here are several patches backported to v4.9+ to fix runtime PM problems in musb drivers. Regards, -Bin. Andreas Kemnade (1): usb: musb: fix enumeration after resume Merlijn Wajer (2): usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers usb: musb: Fix external

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

2018-04-23 Thread Bin Liu
gt; Acked-by: Tony Lindgren <t...@atomide.com> Signed-off-by: Bin Liu <b-...@ti.com> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- drivers/usb/musb/musb_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb

Re: howto debug xhci driver?

2018-04-23 Thread Bin Liu
On Mon, Apr 23, 2018 at 07:21:12PM +0530, Tushar Nimkar wrote: > Hi, > > On 2018-04-23 18:58, Bin Liu wrote: > >On Mon, Apr 23, 2018 at 11:14:55AM +0530, Tushar Nimkar wrote: > >>On 2018-04-21 00:03, Bin Liu wrote: > >>>Hi, > >>> > >>>On

[PATCH 2/2] USB: musb: host: prevent core phy initialisation

2018-04-23 Thread Bin Liu
ensti...@googlemail.com> Signed-off-by: Johan Hovold <jo...@kernel.org> Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 3a8451a15f7f..4fa372c845

[PATCH 1/2] USB: musb: dsps: drop duplicate phy initialisation

2018-04-23 Thread Bin Liu
er drivers). Cc: Uwe Kleine-König <u.kleine-koe...@pengutronix.de> Signed-off-by: Johan Hovold <jo...@kernel.org> Acked-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de> Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_dsps.c | 2 -- 1 file changed, 2 del

[PATCH 0/2] musb fixes for v4.17-rc3

2018-04-23 Thread Bin Liu
Hi Greg, Here are musb fixes for v4.17-rc3, which fix two bugs in phy handling. Please let me know if any change is needed. Regards, -Bin. Johan Hovold (2): USB: musb: dsps: drop duplicate phy initialisation USB: musb: host: prevent core phy initialisation

Re: howto debug xhci driver?

2018-04-23 Thread Bin Liu
On Mon, Apr 23, 2018 at 11:14:55AM +0530, Tushar Nimkar wrote: > On 2018-04-21 00:03, Bin Liu wrote: > >Hi, > > > >On Tue, Mar 20, 2018 at 02:28:00PM -0700, Paul Zimmerman wrote: > >>Forgot to CC linux-usb. > >> > >> > >> Forwarded

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

[PATCH] usb: musb: trace: fix NULL pointer dereference in musb_g_tx()

2018-04-20 Thread Bin Liu
: fc78003e5345a("usb: musb: gadget: add usb-request tracepoints") Cc: sta...@vger.kernel.org # v4.8+ Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/mu

Re: howto debug xhci driver?

2018-04-20 Thread Bin Liu
Hi, On Tue, Mar 20, 2018 at 02:28:00PM -0700, Paul Zimmerman wrote: > Forgot to CC linux-usb. > > > Forwarded Message > Subject: Re: howto debug xhci driver? > Date: Tue, 20 Mar 2018 13:56:21 -0700 > From: Paul Zimmerman <pauld...@gmail.com> > T

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: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-20 Thread Bin Liu
On Fri, Apr 20, 2018 at 01:57:23PM +0300, Felipe Balbi wrote: > > Hi, > > Bin Liu <b-...@ti.com> writes: > >> Felipe Balbi <felipe.ba...@linux.intel.com> writes: > >> >>> Bin Liu <b-...@ti.com> writes: > >> >>> > On

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-19 Thread Bin Liu
On Thu, Apr 19, 2018 at 02:18:21PM +0300, Felipe Balbi wrote: > > Hi, > > Felipe Balbi <felipe.ba...@linux.intel.com> writes: > >>> Bin Liu <b-...@ti.com> writes: > >>> > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: >

[PATCH 3/3] usb: musb: host: fix potential NULL pointer dereference

2018-04-18 Thread Bin Liu
dereference. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_host.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index e50438ae241e..218aadef5bbf 100644 --- a/drivers/usb/musb/musb_host.c

[PATCH 1/3] usb: musb: gadget: fix to_musb_request() to not return NULL

2018-04-18 Thread Bin Liu
tools. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.h b/drivers/usb/musb/musb_gadget.h index 9c34aca06db6..466877b471ef 100644 --- a/drivers/usb/musb/musb_gadget.h

[PATCH 2/3] usb: musb: gadget: fix to_musb_ep() to not return NULL

2018-04-18 Thread Bin Liu
UDC core ensures the usb_ep parameter passed in is not NULL, so checking if (ep != NULL) is pointless. Convert to_musb_ep() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_ga

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 09/11] usb: musb: break the huge isr musb_stage0_irq() into small functions

2018-04-18 Thread Bin Liu
On Wed, Apr 18, 2018 at 05:14:05PM +0300, Dan Carpenter wrote: > On Wed, Apr 18, 2018 at 08:33:52AM -0500, Bin Liu wrote: > > Hi Dan, > > > > I appreciate you scaning the patches and reporting the issues. The report is valuable! > > > > These are kbuild stuff

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-18 Thread Bin Liu
On Wed, Apr 18, 2018 at 08:20:28AM +0300, Felipe Balbi wrote: > > Hi Bin, > > Bin Liu <b-...@ti.com> writes: > > On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: > >> Hi guys, > >> > >> I've been working on this series f

Re: [PATCH 09/11] usb: musb: break the huge isr musb_stage0_irq() into small functions

2018-04-18 Thread Bin Liu
on v4.17-rc1 next-20180417] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Bin-Liu/usb-musb-cleanup/20180417-133633 > base: https://git.kernel.org/pub/scm/linux/kerne

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-17 Thread Bin Liu
Felipe, On Mon, Apr 09, 2018 at 02:26:14PM +0300, Felipe Balbi wrote: > Hi guys, > > I've been working on this series for a while now. I feels like after > this series the transfer management code is far easier to read and > understand. > > Based on my tests, I have no regressions. Tested

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

[PATCH 04/11] usb: musb: remove some register access wrapper functions

2018-04-16 Thread Bin Liu
musb_write_ulpi_buscontrol musb_read_txfifosz musb_read_txfifoadd musb_read_rxfifosz musb_read_rxfifoadd musb_read_ulpi_buscontrol musb_read_hwvers Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 42 - drive

[PATCH 10/11] usb: musb: remove references to default_a of struct usb_otg

2018-04-16 Thread Bin Liu
musb drivers do not use the otg fsm framework, so referencing to otg->default_a doesn't have any effect, so remove the references. But tusb6010 glue driver uses it locally to control the vbus power, so keep the references in tusb6010 only. Signed-off-by: Bin Liu <b-...@ti.com> --- dr

[PATCH 09/11] usb: musb: break the huge isr musb_stage0_irq() into small functions

2018-04-16 Thread Bin Liu
musb_stage0_irq() is 400+ lines long. Break its interrupt events handling into each individual functions to make it easy to read. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 730 +++ 1 file changed, 384 insertions(+

[PATCH 11/11] usb: musb: disable otg protocol support

2018-04-16 Thread Bin Liu
.html Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_gadget.c | 5 + drivers/usb/musb/musb_host.c | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 63e9d4a4395f..b0d86d895420

[PATCH 05/11] usb: musb: remove duplicated quirks flag

2018-04-16 Thread Bin Liu
Both musb_io and musb_platform_ops in struct musb define a quirks flag for the same purpose. Let's remove the one in struct musb_io, and use that in struct musb_platform_ops instead. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c | 10 -- drivers/us

[PATCH 07/11] usb: musb: remove duplicated port mode enum

2018-04-16 Thread Bin Liu
include/linux/usb/musb.h already defines enum for musb port mode, so remove the duplicate in musb_core.h and use the definition in musb.h. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_core.c| 8 drivers/usb/musb/musb_core.h| 8 +--- drivers/us

[PATCH 08/11] usb: musb: remove unused members in struct musb_hdrc_config

2018-04-16 Thread Bin Liu
The following members in struct musb_hdrc_config are not used, so remove them. soft_con utm_16 big_endian mult_bulk_tx mult_bulk_rx high_iso_tx high_iso_rx dma dma_channels dyn_fifo_size vendor_ctrl vendor_stat vendor_req dma_req_chan musb_hdrc_eps_bits Signed-off-by: Bin Liu <b-...@ti.

[PATCH 06/11] usb: musb: dsps: remove duplicated get_musb_port_mode()

2018-04-16 Thread Bin Liu
musb_core already has musb_get_mode(), so remove the duplicate from musb_dsps.c. Signed-off-by: Bin Liu <b-...@ti.com> --- drivers/usb/musb/musb_dsps.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/us

  1   2   3   4   5   6   7   8   9   10   >