Re: "usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-12 Thread Hans de Goede
Hi, On 12-06-18 08:27, Masahiro Yamada wrote: Hi Hans, 2018-06-08 5:57 GMT+09:00 Hans de Goede : Hi All, While testing usb-next on some Intle Bay and Cherry Trail devices I noticed the following new error in my logs: [ 26.187958] dwc3 dwc3.3.auto: Failed to get clk 'ref': -2 This is cause

Re: "usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-12 Thread Masahiro Yamada
Hi Hans, 2018-06-12 16:56 GMT+09:00 Hans de Goede : > Hi, > > On 12-06-18 08:27, Masahiro Yamada wrote: >> >> Hi Hans, >> >> 2018-06-08 5:57 GMT+09:00 Hans de Goede : >>> >>> Hi All, >>> >>> While testing usb-next on some Intle Bay and Cherry Trail >>> devices I noticed the following new error in

[PATCH] usb: dwc3: Only call clk_bulk_get() on devicetree instantiated devices

2018-06-12 Thread Hans de Goede
Commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") adds support for handling clocks and resets in the DWC3 core, so that for platforms following the standard devicetree bindings this does not need to be duplicated in all the different glue layers. These changes intended for

[PATCH] usb: dwc2: gadget: fix packet drop issue for ISOC OUT transfers

2018-06-12 Thread Minas Harutyunyan
In ISOC OUT transfer, when the OUT token received while EP disabled, we shouldn't complete a usb request. The current flow completed one usb request, this will lead to a packet drop to function driver. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 2 -- 1 file changed, 2 delet

Re: [PATCH] usb: dwc3: Only call clk_bulk_get() on devicetree instantiated devices

2018-06-12 Thread Masahiro Yamada
2018-06-12 17:24 GMT+09:00 Hans de Goede : > Commit fe8abf332b8f ("usb: dwc3: support clocks and resets for DWC3 core") > adds support for handling clocks and resets in the DWC3 core, so that for > platforms following the standard devicetree bindings this does not need > to be duplicated in all the

[PATCH] usb: dwc2: gadget: Fix issue in dwc2_gadget_start_isoc()

2018-06-12 Thread Minas Harutyunyan
In case of requests queue is empty reset EP target_frame to initial value. This allow restarting ISOC traffic in case when function driver queued requests with interruptions. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drive

Re: [PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-12 Thread Heikki Krogerus
On Tue, Jun 12, 2018 at 09:53:01AM +0800, Peter Chen wrote: > The port->logbuffer_head may be wrong if the two processes enters > _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log > before the 1st process update the index, then the 2nd process will > not allocate logbuffer, when t

Re: fusb302b driver: devicetree support

2018-06-12 Thread Heikki Krogerus
Hi Doug, On Mon, Jun 11, 2018 at 02:15:19PM -0400, dgilb...@interlog.com wrote: > Hi, > I have a FUSB302B breakout board: > > https://www.tindie.com/products/ReclaimerLabs/usb-type-c-power-delivery-phy-breakout-board/?pt=ac_prod_search > > That is connected to a Acme Arietta module: > https://

Re: [PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-12 Thread Guenter Roeck
On 06/11/2018 06:53 PM, Peter Chen wrote: The port->logbuffer_head may be wrong if the two processes enters _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log before the 1st process update the index, then the 2nd process will not allocate logbuffer, when the 2nd process tries to

[PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-12 Thread Sebastian Andrzej Siewior
In the code path __usb_hcd_giveback_urb() -> wdm_in_callback() -> service_outstanding_interrupt() The function service_outstanding_interrupt() will unconditionally enable interrupts during unlock and invoke usb_submit_urb() with GFP_KERNEL. If the HCD completes in BH (like ehci does) then t

Re: [PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-12 Thread Alan Stern
On Tue, 12 Jun 2018, Sebastian Andrzej Siewior wrote: > In the code path > __usb_hcd_giveback_urb() > -> wdm_in_callback() >-> service_outstanding_interrupt() > > The function service_outstanding_interrupt() will unconditionally enable > interrupts during unlock and invoke usb_submit_urb(

Re: USB role switches, usb-connector, typec and device trees

2018-06-12 Thread Mats Karrman
On 2018-06-07 14:01, Heikki Krogerus wrote: On Thu, Jun 07, 2018 at 09:22:56AM +0200, Hans de Goede wrote: Hi, On 06-06-18 23:36, Mats Karrman wrote: Hello Gentlemen, I'm trying to get my head around USB role switches in connection with Type-C ports and device-trees. So far I have not found

Re: USB role switches, usb-connector, typec and device trees

2018-06-12 Thread Mats Karrman
Hi Andrzej, On 2018-06-07 13:40, Andrzej Hajda wrote: On 06.06.2018 23:36, Mats Karrman wrote: Hello Gentlemen, I'm trying to get my head around USB role switches in connection with Type-C ports and device-trees. So far I have not found much documentation, e.g. there are no device-tree bindi

Re: [PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-12 Thread Sebastian Andrzej Siewior
On 2018-06-12 12:43:01 [-0400], Alan Stern wrote: > On Tue, 12 Jun 2018, Sebastian Andrzej Siewior wrote: > > > In the code path > > __usb_hcd_giveback_urb() > > -> wdm_in_callback() > >-> service_outstanding_interrupt() > > > > The function service_outstanding_interrupt() will unconditio

Re: [PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-12 Thread Bjørn Mork
Sebastian Andrzej Siewior writes: > On 2018-06-12 12:43:01 [-0400], Alan Stern wrote: >> On Tue, 12 Jun 2018, Sebastian Andrzej Siewior wrote: >> >> > In the code path >> > __usb_hcd_giveback_urb() >> > -> wdm_in_callback() >> >-> service_outstanding_interrupt() >> > >> > The function s

Re: [PATCH] USB: cdc-wdm: don't enable interrupts in USB-giveback

2018-06-12 Thread Sebastian Andrzej Siewior
On 2018-06-12 20:28:27 [+0200], Bjørn Mork wrote: > Yes, the atomic case should be rare. It will only happen on errors, and > IIUC that's only to work around issues caused by reporting errors back > to userspace without actually wanting to err out anyway. Yup. The missing part is if this was done

[PATCH] usb: dwc3: Add a glue driver for Synopsys HAPS platform

2018-06-12 Thread Thinh Nguyen
This driver is to be used for Synopsys PCIe-base HAPS platform. Move the the HAPS support from dwc3-pci to this driver. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/Kconfig | 13 ++-- drivers/usb/dwc3/Makefile| 1 + drivers/usb/dwc3/dwc3-haps.c | 137 ++

Re: [PATCH 2/2] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-12 Thread Laurent Pinchart
Hi Joel, On Sunday, 10 June 2018 14:06:28 EEST Joel Pepper wrote: > @Laurent, I accidentally hit "Reply" instead of "Reply All", please > disregard the previous copy of this email > > Hi Laurent and Paul, > > On 08.06.2018 21:16, Laurent Pinchart wrote: > > Hi Joel and Paul, > > > > On Friday,

[PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-12 Thread Laurent Pinchart
From: Joel Pepper - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. - Automatically assign ascending bFrameIndex to each frame in a format. Before all "bFrameindex" attributes were set to "1" with no way to configure the gadget otherwise. This resulted in the host always negotiating

Re: [PATCH v7] usb: gadget: uvc: configfs: Add bFrameIndex attributes

2018-06-12 Thread Joel Pepper
Hi Laurent, looks good to me; I have no complaints. On 13.06.2018 00:58, Laurent Pinchart wrote: > From: Joel Pepper > > - Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size. > - Automatically assign ascending bFrameIndex to each frame in a format. > > Before all "bFrameindex" attribut