Re: [PATCH v5] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.

2018-12-19 Thread Oliver Neukum
On Mi, 2018-12-19 at 12:03 +0800, Macpaul Lin wrote: > On Wed, 2018-12-19 at 10:31 +0700, Lars Melin wrote: > > On 12/19/2018 10:16, Macpaul Lin wrote: > > > > Hi Macpaul, > > your verbose usb listing show me that Mediatek has made two different > > 0e8d:003 devices, see my verbose lsusb listing

Re: [PATCH v7] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.

2018-12-19 Thread Johan Hovold
On Wed, Dec 19, 2018 at 12:11:03PM +0800, Macpaul Lin wrote: > Mediatek Preloader is a proprietary embedded boot loader for loading > Little Kernel and Linux into device DRAM. > > This boot loader also handle firmware update. Mediatek Preloader will be > enumerated as a virtual COM port when the d

[PATCH v3 1/6] usb: uvc: include videodev2.h in g_uvc.h

2018-12-19 Thread Paul Elder
V4L2_EVENT_PRIVATE_START is used in g_uvc.h but is defined in videodev2.h, which is not included and causes a compiler warning: linux/usb/g_uvc.h:15:28: error: ‘V4L2_EVENT_PRIVATE_START’ undeclared here (not in a function) #define UVC_EVENT_FIRST (V4L2_EVENT_PRIVATE_START + 0) Include videode

[PATCH v3 5/6] usb: musb: gadget: implement optional explicit status stage

2018-12-19 Thread Paul Elder
Implement the mechanism for optional explicit status stage for the MUSB driver. This allows a function driver to specify what to reply for the status stage. The functionality for an implicit status stage is retained. Signed-off-by: Paul Elder v1 Reviewed-by: Laurent Pinchart v1 Acked-by: Bin Liu

[PATCH v3 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-19 Thread Paul Elder
A usb gadget function driver may or may not want to delay the status stage of a control OUT request. An instance it might want to is to asynchronously validate the data of a class-specific request. A function driver that wants an explicit status stage should set the newly added explicit_status fla

[PATCH v3 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2018-12-19 Thread Paul Elder
Currently, for uvc class-specific control IN and OUT requests, in the setup handler a UVC_EVENT_SETUP with the setup control is enqueued to userspace. In response to this, the uvc function driver expects userspace to call ioctl UVCIOC_SEND_RESPONSE containing uvc request data. In the case of contr

[PATCH v3 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2018-12-19 Thread Paul Elder
Since "usb: gadget: uvc: enqueue uvc_request_data in setup handler for control OUT requests" it is no longer necessary for userspace to call ioctl UVCIOC_SEND_RESPONSE in response to receiving a UVC_EVENT_SETUP from the uvc function driver for a control OUT request. This change means that for cont

[PATCH v3 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2018-12-19 Thread Paul Elder
This patch series adds a mechanism to allow asynchronously validating the data stage of a control OUT request, and for stalling or suceeding the request accordingly. This mechanism is implemented for MUSB, and is used by UVC. At the same time, UVC packages the setup stage and data stage data togeth

[PATCH v3 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2018-12-19 Thread Paul Elder
We now have a mechanism to signal the UDC driver to reply to a control OUT request with STALL or ACK, and we have packaged the setup stage data and the data stage data of a control OUT request into a single UVC_EVENT_DATA for userspace to consume. The ioctl UVCIOC_SEND_RESPONSE in the case of a con

Re: USB driver resets

2018-12-19 Thread Richard van der Hoff
On 13/12/2018 10:29, Richard van der Hoff wrote: Thanks for looking at it. I've attached a log from a 4.19.8 kernel showing the problem with the dynamic debug flags you suggested. The first instance of the problem seems to begin with: Dec 13 09:32:56 fred kernel: [  479.158038] xhci_hcd :

Re: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G)

2018-12-19 Thread Charles Yeh
Hi Johan & Greg, Thansk for you check the patch file.. PL2303 is a general name on the market. In fact, PL2303 has the following various ICs. A type: PL2303H, B type: PL2303XA, PL2303HXA, PL2303HXB, PL2303HXC, PL2303HXD, PL2303EA, PL2303SA, PL2303RA, PL2303TA, PL2303TB C type:PL2303HXN: PL23

Re: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G)

2018-12-19 Thread Greg KH
On Wed, Dec 19, 2018 at 06:26:06PM +0800, Charles Yeh wrote: > Hi Johan & Greg, > Thansk for you check the patch file.. > > PL2303 is a general name on the market. In fact, PL2303 has the > following various ICs. > A type: PL2303H, > B type: PL2303XA, PL2303HXA, PL2303HXB, PL2303HXC, PL2303HX

[PATCH] usb: gadget: function: f_uac1 add interface assoc desc

2018-12-19 Thread liangshengjun
Add f_uac1 interface association descriptor, make f_uac1 link other function(like f_uvc) is possible. Signed-off-by: Liang Shengjun --- drivers/usb/gadget/function/f_uac1.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gad

[PATCH] usb: gadget: function: sync f_uac1 ac header baInterfaceNr

2018-12-19 Thread liangshengjun
f_uac1 audio control header descriptor default set baInterfaceNr[]={1,2}, but usb gadget make a configuration descriptor with more interfaces combination, it can not confirm f_uac1 function linked first. So always keep baInterfaceNr[]={1,2} is correct, and it is necessary to sync baInterfaceNr[] w

Re: [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns

2018-12-19 Thread Rob Herring
On Tue, Dec 18, 2018 at 6:22 PM Thinh Nguyen wrote: > > Hi Rob, > > On 12/18/2018 8:39 AM, Rob Herring wrote: > > On Fri, Dec 07, 2018 at 06:27:30PM -0800, Thinh Nguyen wrote: > >> This patch introduces property "snps,refclk-period-ns" to inform the > >> controller of the reference clock period. I

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-19 Thread Minas Harutyunyan
Hi John, On 12/18/2018 6:35 PM, John Keeping wrote: > Hi Minas, > > On Fri, 14 Dec 2018 09:00:08 + > Minas Harutyunyan wrote: >> First of all, sorry for delayed answer. >> Looks like similar issue seen by Andrzej Pietrasiewicz >> : "dwc2 isochronous transfers issues". Same >> feedback provid

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-19 Thread Rob Herring
On Mon, Dec 03, 2018 at 05:28:56PM +0800, Chen Yu wrote: > Hi, > > On 2018/12/3 16:59, Sergei Shtylyov wrote: > > On 03.12.2018 11:51, Chen Yu wrote: > > > This patch adds binding descriptions to support the dwc3 controller > on HiSilicon SoCs and boards like the HiKey960. > >

Re: [PATCH v1 02/12] dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY

2018-12-19 Thread Rob Herring
On Mon, Dec 03, 2018 at 11:45:05AM +0800, Yu Chen wrote: > This patch adds binding documentation for supporting the hi3660 usb > phy on boards like the HiKey960. > > Cc: Rob Herring > Cc: Mark Rutland > Cc: John Stultz > Cc: Binghui Wang > Signed-off-by: Yu Chen > -- > v1: Fix some format err

Re: [PATCH v1 03/12] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960

2018-12-19 Thread Rob Herring
On Mon, Dec 03, 2018 at 11:45:06AM +0800, Yu Chen wrote: > This patch adds binding documentation to support usb hub and usb > data role switch of Hisilicon HiKey&HiKey960 Board. > > Cc: Sergei Shtylyov > Cc: Rob Herring > Cc: Mark Rutland > Cc: John Stultz > Cc: Binghui Wang > Signed-off-by:

[PATCH 2/2] usb: usb251xb: add usb data lane port swap feature

2018-12-19 Thread Marco Felsch
The HW can swap the USB differential-pair (D+/D-) for each port separately. So the USB signals can be re-aligned with a misplaced USB connector on the PCB. Signed-off-by: Marco Felsch --- drivers/usb/misc/usb251xb.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/

[PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping

2018-12-19 Thread Marco Felsch
Add optional binding to allow USB differential-pair (D+/D-) data lane swapping. The swapping can be specified for each port separately, default is no swapping. Signed-off-by: Marco Felsch --- Documentation/devicetree/bindings/usb/usb251xb.txt | 4 1 file changed, 4 insertions(+) diff --git

Re: USB driver resets

2018-12-19 Thread Mathias Nyman
On 19.12.2018 12:18, Richard van der Hoff wrote: On 13/12/2018 10:29, Richard van der Hoff wrote: Thanks for looking at it. I've attached a log from a 4.19.8 kernel showing the problem with the dynamic debug flags you suggested. The first instance of the problem seems to begin with: Dec 13

Re: USB driver resets

2018-12-19 Thread Richard van der Hoff
On 19/12/2018 15:07, Mathias Nyman wrote: On 19.12.2018 12:18, Richard van der Hoff wrote: On 13/12/2018 10:29, Richard van der Hoff wrote: Thanks for looking at it. I've attached a log from a 4.19.8 kernel showing the problem with the dynamic debug flags you suggested. The first instance

Re: [PATCH v3 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-19 Thread Alan Stern
On Wed, 19 Dec 2018, Paul Elder wrote: > A usb gadget function driver may or may not want to delay the status > stage of a control OUT request. An instance it might want to is to -^ Typo: missing "where" > asynchronously validate the data of a class-spe

Fwd: composite device fails to reset "suspended" flag

2018-12-19 Thread Frank Mori Hess
Hi Felipe, I'm using a usb composite gadget (g_serial) and it initially has a sysfs attribute "suspended" which is zero. When I physically unplug the usb cable, the "suspend" callback is called and the "suspended" attribute becomes 1. However, when I plug the gadget back in, the "reset" callback

Re: [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns

2018-12-19 Thread Thinh Nguyen
Hi Rob, On 12/19/2018 5:18 AM, Rob Herring wrote: > On Tue, Dec 18, 2018 at 6:22 PM Thinh Nguyen > wrote: >> Hi Rob, >> >> On 12/18/2018 8:39 AM, Rob Herring wrote: >>> On Fri, Dec 07, 2018 at 06:27:30PM -0800, Thinh Nguyen wrote: This patch introduces property "snps,refclk-period-ns" to in

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-19 Thread Chen Yu
Hi, On 2018/12/19 22:09, Rob Herring wrote: > On Mon, Dec 03, 2018 at 05:28:56PM +0800, Chen Yu wrote: >> Hi, >> >> On 2018/12/3 16:59, Sergei Shtylyov wrote: >>> On 03.12.2018 11:51, Chen Yu wrote: >>> >> This patch adds binding descriptions to support the dwc3 controller >> on HiSilicon

Re: [PATCH v1 02/12] dt-bindings: phy: Add support for HiSilicon's hi3660 USB PHY

2018-12-19 Thread Chen Yu
Hi, On 2018/12/19 22:14, Rob Herring wrote: > On Mon, Dec 03, 2018 at 11:45:05AM +0800, Yu Chen wrote: >> This patch adds binding documentation for supporting the hi3660 usb >> phy on boards like the HiKey960. >> >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc: John Stultz >> Cc: Binghui Wang >>

Re: [PATCH v1 03/12] dt-bindings: misc: Add bindings for HiSilicon usb hub and data role switch functionality on HiKey960

2018-12-19 Thread Chen Yu
On 2018/12/19 22:21, Rob Herring wrote: > On Mon, Dec 03, 2018 at 11:45:06AM +0800, Yu Chen wrote: >> This patch adds binding documentation to support usb hub and usb >> data role switch of Hisilicon HiKey&HiKey960 Board. >> >> Cc: Sergei Shtylyov >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc:

Re: [PATCH v1 01/12] dt-bindings: usb: add support for dwc3 controller on HiSilicon SoCs

2018-12-19 Thread Felipe Balbi
Hi, Rob Herring writes: >> +Example: >> +    usb3: hisi_dwc3 { >> +    compatible = "hisilicon,hi3660-dwc3"; >> +    #address-cells = <2>; >> +    #size-cells = <2>; >> +    ranges; >> + >> +    clocks = <&crg_ctrl HI3660_CLK_ABB_USB>,

Re: [PATCH v2 1/4] usb: dwc3: Add property snps,refclk-period-ns

2018-12-19 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >>> On 12/18/2018 8:39 AM, Rob Herring wrote: On Fri, Dec 07, 2018 at 06:27:30PM -0800, Thinh Nguyen wrote: > This patch introduces property "snps,refclk-period-ns" to inform the > controller of the reference clock period. If the reference clock period >

Re: [PATCH v2 3/4] usb: dwc3: Add property snps,enable-refclk-sof

2018-12-19 Thread Felipe Balbi
Hi, Rob Herring writes: > On Fri, Dec 07, 2018 at 06:27:43PM -0800, Thinh Nguyen wrote: >> This patch adds a property to enable the controller to track the >> frame number based on the reference clock. >> >> When operating in USB 2.0 mode, the peripheral controller uses the USB2 >> PHY clocks t

Re: Fwd: composite device fails to reset "suspended" flag

2018-12-19 Thread Felipe Balbi
Hi, Frank Mori Hess writes: > I'm using a usb composite gadget (g_serial) and it initially has a > sysfs attribute "suspended" which is zero. When I physically unplug > the usb cable, the "suspend" callback is called and the "suspended" > attribute becomes 1. However, when I plug the gadget ba