RE: [PATCH v3 4/6] usb: chipidea: Fix otg event handler

2018-09-04 Thread Peter Chen
> v2: v3: no change > > drivers/usb/chipidea/otg.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index > db4ceff..f25d482 100644 > --- a/drivers/usb/chipidea/otg.c > +++ b/drivers/usb/chipidea/otg.c >

Re: musb_hdrc HNP?

2018-09-04 Thread Takashi Matsuzawa
Hello. >Is commit [1] reverted or not in this experiment? In fact I noticed I am looking into TI kernel which is distributed in official debian image for pocketbeagle. So, the behavior may not be the same as mainline kernel code. I think I continue look into what I have now, and later check

Re: [hid:for-4.20/multitouch 1/1] drivers/hid/hid-multitouch.c:1327:5: error: 'struct hid_input' has no member named 'application'

2018-09-04 Thread Jiri Kosina
On Wed, 5 Sep 2018, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git > for-4.20/multitouch > head: 93c61d2e6bc4849a5527e32568479ff67154870e > commit: 93c61d2e6bc4849a5527e32568479ff67154870e [1/1] HID: multitouch: > simplify the application

[hid:for-4.20/multitouch 1/1] drivers/hid/hid-multitouch.c:1327:5: error: 'struct hid_input' has no member named 'application'

2018-09-04 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-4.20/multitouch head: 93c61d2e6bc4849a5527e32568479ff67154870e commit: 93c61d2e6bc4849a5527e32568479ff67154870e [1/1] HID: multitouch: simplify the application retrieval config: x86_64-randconfig-x018-201835 (attached as

Re: [PATCH v2] usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()

2018-09-04 Thread Alan Stern
On Mon, 3 Sep 2018, Mathias Nyman wrote: > The steps taken by usb core to set a new interface is very different from > what is done on the xHC host side. > > xHC hardware will do everything in one go. One command is used to set up > new endpoints, free old endpoints, check bandwidth, and run the

Re: A few questions about gadgetfs

2018-09-04 Thread Alan Stern
On Tue, 4 Sep 2018, Andrey Konovalov wrote: > Hi Alan, > > Another question. According to the USB spec: > > """ > The Data stage of a control transfer from an endpoint to the host is > complete when the endpoint does one of the following: > * Has transferred exactly the amount of data specified

Re: [PATCH] usb: Don't die twice if PCI xhci host is not responding in resume

2018-09-04 Thread Alan Stern
On Tue, 4 Sep 2018, Mathias Nyman wrote: > usb_hc_died() should only be called once, and with the primary HCD > as parameter. It will mark both primary and secondary hcd's dead. > > Remove the extra call to usb_cd_died with the shared hcd as parameter. > > Fixes: ff9d78b36f76 ("USB: Set

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Alan Stern
On Tue, 4 Sep 2018, Johan Hovold wrote: > On Tue, Sep 04, 2018 at 12:21:09PM +0200, Oliver Neukum wrote: > > On Di, 2018-09-04 at 11:31 +0200, Johan Hovold wrote: > > > On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > > > > For those people who run with panic_on_warn a WARN()

Re: A few questions about gadgetfs

2018-09-04 Thread Andrey Konovalov
Hi Alan, Another question. According to the USB spec: """ The Data stage of a control transfer from an endpoint to the host is complete when the endpoint does one of the following: * Has transferred exactly the amount of data specified during the Setup stage * Transfers a packet with a payload

[PATCH v3 6/6] arm: dts: qcom: db410c: Enable USB OTG support

2018-09-04 Thread Loic Poulain
The Dragonboard-410c is able to act either as USB Host or Device. The role can be determined at runtime via the USB_HS_ID pin which is derived from the micro-usb port VBUS pin. In Host role, SoC USB D+/D- are routed to the onboard USB 2.0 HUB. In Device role, SoC USB D+/D- are routed to the USB

[PATCH v3 5/6] phy: qcom-usb-hs: Fix unbalanced notifier registration

2018-09-04 Thread Loic Poulain
Phy power on/off cycle can happen several times during device life. We then need to balance the extcon notifier registration accordingly. Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") Signed-off-by: Loic Poulain --- v2: don't use devres version (power-on always followed by

[PATCH v3 4/6] usb: chipidea: Fix otg event handler

2018-09-04 Thread Loic Poulain
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain --- v2: v3: no change drivers/usb/chipidea/otg.c |

[PATCH v3 1/6] usb: chipidea: Add dynamic pinctrl selection

2018-09-04 Thread Loic Poulain
Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they

[PATCH v3 3/6] usb: chipidea: Prevent unbalanced IRQ disable

2018-09-04 Thread Loic Poulain
The ChipIdea IRQ is disabled before scheduling the otg work and re-enabled on otg work completion. However if the job is already scheduled we have to undo the effect of disable_irq int order to balance the IRQ disable-depth value. Fixes: be6b0c1bd0be ("usb: chipidea: using one inline function to

[PATCH v3 2/6] doc: usb: ci-hdrc-usb2: Add pinctrl properties definition

2018-09-04 Thread Loic Poulain
Some hardware implementations require to configure pins differently according to the USB role (host/device), this can be an update of the pins routing or a simple GPIO value change. This patch introduces new optional "host" and "device" pinctrls. If these pinctrls are defined by the device, they

Re: Aw: Re: Fw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Mathias Nyman
On 04.09.2018 17:51, Frank Wunderlich wrote: this fixes the issue: adding the following lines to drivers/usb/host/xhci-mem.c line:1616 if (xhci->quirks & XHCI_MTK_HOST) { in_ep_ctx->reserved[0] = out_ep_ctx->reserved[0]; in_ep_ctx->reserved[1] = out_ep_ctx->reserved[1]; }

Aw: Re: Fw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Frank Wunderlich
this fixes the issue: adding the following lines to drivers/usb/host/xhci-mem.c line:1616 if (xhci->quirks & XHCI_MTK_HOST) { in_ep_ctx->reserved[0] = out_ep_ctx->reserved[0]; in_ep_ctx->reserved[1] = out_ep_ctx->reserved[1]; } commit below is wrong...i got the response: This

[PATCH] usb: Don't die twice if PCI xhci host is not responding in resume

2018-09-04 Thread Mathias Nyman
usb_hc_died() should only be called once, and with the primary HCD as parameter. It will mark both primary and secondary hcd's dead. Remove the extra call to usb_cd_died with the shared hcd as parameter. Fixes: ff9d78b36f76 ("USB: Set usb_hcd->state and flags for shared roothubs") Signed-off-by:

Re: musb_hdrc HNP?

2018-09-04 Thread Bin Liu
Hi, On Fri, Aug 31, 2018 at 06:35:50AM +, Takashi Matsuzawa wrote: > Hello. > I just confirmed what I wanted to see. > I could do lsusb to list A-device (from b_host) and B-device (from a_host). > Suspending from either side kicked role change between A-device and B-device > (in both

Re: [PATCH v3 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-04 Thread Hans de Goede
Hi, On 04-09-18 14:13, Andy Shevchenko wrote: On Tue, Sep 4, 2018 at 2:22 PM Heikki Krogerus wrote: Hi, These patches will introduce a few improvements to the USB Type-C support on Intel CHT platform. In this series I'm preparing Intel CHT mux handling for DisplayPort Alt Mode support, but

Re: Fw: Aw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Mathias Nyman
On 04.09.2018 16:14, Frank Wunderlich wrote: Hi, i got an info that my issue was caused by this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=217491487c43892318c18b6dcafe33b6353efd40 Patch is in progress... That patch has been there since 4.13 If 4.16

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
Hi, Ranran writes: >> Ranran writes: >> > > A fix for my last comment: >> >> > usb device controller should be supported with conga-MA5 (contains >> >> > Intel's appolo lake), so I am still not sure why I find /sys/class/udc >> >> > empty. >> >> > In congatec MA-5 document it is said: >> >> >

Re: [PATCH] dwc3: Remove wait for wait_end_transfer event.

2018-09-04 Thread Pierre Le Magourou
Hello, Le jeu. 19 juil. 2018 à 09:24, Felipe Balbi a écrit : > > > Hi, > > lemag...@gmail.com writes: > > From: Pierre Le Magourou > > > > We can't wait for END_OF_TRANSFER event in dwc3_gadget_ep_dequeue() > > because it can be called in an interruption context. > > > > TRBs are now cleared

Re: Fw: Aw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Frank Wunderlich
Hi, i got an info that my issue was caused by this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=217491487c43892318c18b6dcafe33b6353efd40 Patch is in progress... Regards Frank Am 4. September 2018 13:16:12 MESZ schrieb Frank Wunderlich : >Hi, thank you

Re: gadgetfs & endpoints

2018-09-04 Thread Ranran
On Tue, Sep 4, 2018 at 2:36 PM Ranran wrote: > > Hello, > > In gadgetfs documentation I find no mention of endpoints: > https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt > > Is it possible to create endpoints using gadgetfs ? > The question need to be phrased differently: Is it

Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-09-04 Thread Johan Hovold
On Sat, Aug 04, 2018 at 12:17:15PM +0200, Loic Poulain wrote: > Some FTDI devices like FTX or FT232R support CBUS Bit Bang mode on CBUS > pins, allowing host to control them via simple USB control transfers. > To make use of a CBUS pin in Bit Bang mode, the pin must be configured > to I/O mode in

Re: Nothing in /sys/class/udc

2018-09-04 Thread Ranran
On Tue, Sep 4, 2018 at 3:26 PM Felipe Balbi wrote: > > > hi, > > Ranran writes: > > > A fix for my last comment: > >> > usb device controller should be supported with conga-MA5 (contains > >> > Intel's appolo lake), so I am still not sure why I find /sys/class/udc > >> > empty. > >> > In

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
hi, Ranran writes: > > A fix for my last comment: >> > usb device controller should be supported with conga-MA5 (contains >> > Intel's appolo lake), so I am still not sure why I find /sys/class/udc >> > empty. >> > In congatec MA-5 document it is said: >> > "The conga-MA5 offers six USB 2.0

Re: [PATCH v3 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-04 Thread Andy Shevchenko
On Tue, Sep 4, 2018 at 2:22 PM Heikki Krogerus wrote: > > Hi, > > These patches will introduce a few improvements to the USB Type-C > support on Intel CHT platform. In this series I'm preparing Intel CHT > mux handling for DisplayPort Alt Mode support, but please note that, > after these patches

Re: Nothing in /sys/class/udc

2018-09-04 Thread Ranran
On Tue, Sep 4, 2018 at 12:12 PM Felipe Balbi wrote: > > > Hi, > > Ranran writes: > > On Mon, Sep 3, 2018 at 4:50 PM Ranran wrote: > >> > >> On Mon, Sep 3, 2018 at 4:22 PM Ranran wrote: > >> > > >> > On Mon, Sep 3, 2018 at 3:40 PM Greg KH > >> > wrote: > >> > > > >> > > On Mon, Sep 03, 2018

gadgetfs & endpoints

2018-09-04 Thread Ranran
Hello, In gadgetfs documentation I find no mention of endpoints: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt Is it possible to create endpoints using gadgetfs ? Thank you, ranran

[PATCH v3 05/10] platform: x86: intel_cht_int33fe: Register all connections at once

2018-09-04 Thread Heikki Krogerus
We can register all device connection descriptors with a single call to device_connections_add(). Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

[PATCH v3 09/10] platform: x86: intel_cht_int33fe: Remove the old connections for the muxes

2018-09-04 Thread Heikki Krogerus
USB Type-C class driver now expects the muxes to be always assigned to the ports and not controllers, so the connections for the mux and fusb302 can be removed. Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 18 -- 1 file changed, 4 insertions(+),

[PATCH v3 04/10] drivers: base: Helpers for adding device connection descriptions

2018-09-04 Thread Heikki Krogerus
Introducing helpers for adding and removing multiple device connection descriptions at once. Signed-off-by: Heikki Krogerus --- include/linux/device.h | 24 1 file changed, 24 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index

[PATCH v3 08/10] usb: typec: class: Don't use port parent for getting mux handles

2018-09-04 Thread Heikki Krogerus
It is not possible to use the parent of the port device when requesting mux handles as the parent may be a multiport USB Type-C or PD controller. The muxes must be assigned to the ports, not the controllers. This will also move the requesting of the muxes after the port device is initialized.

[PATCH v3 07/10] platform: x86: intel_cht_int33fe: Add connections for the USB Type-C port

2018-09-04 Thread Heikki Krogerus
Assigning the mux to the USB Type-C port on top of fusb302. That will prepare this driver for the change in the USB Type-C class code, where the class driver will assume the muxes to be always assigned to the ports and not the controllers. Once the USB Type-C class driver has been updated, the

[PATCH v3 10/10] usb: typec: fusb302: reorganizing the probe function a little

2018-09-04 Thread Heikki Krogerus
The debugfs needs to be initialized as the last step in probe in this case. The struct dentry *rootdir can't be pointing to anything unless driver probe really finishes successfully. It is also not necessary to clear the i2c clientdata if the probe fails, so removing the extra label used for

[PATCH v3 06/10] platform: x86: intel_cht_int33fe: Add connection for the DP alt mode

2018-09-04 Thread Heikki Krogerus
Adding a connection for the DisplayPort alternate mode. PI3USB30532 is used for muxing the port to DisplayPort on CHT platforms. The connection allows the alternate mode device to get handle to the mux, and therefore make it possible to use the USB Type-C connector as DisplayPort. Signed-off-by:

[PATCH v3 03/10] platform: x86: intel_cht_int33fe: Add dependency on muxes

2018-09-04 Thread Heikki Krogerus
The connections create clear dependency on the muxes. fusb302 fails to probe unless we have the mux drivers available. Signed-off-by: Heikki Krogerus --- drivers/platform/x86/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/Kconfig

[PATCH v3 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-04 Thread Heikki Krogerus
Hi, These patches will introduce a few improvements to the USB Type-C support on Intel CHT platform. In this series I'm preparing Intel CHT mux handling for DisplayPort Alt Mode support, but please note that, after these patches the DisplayPort alternate mode will still not work out of the box on

[PATCH v3 01/10] usb: typec: Take care of driver module reference counting

2018-09-04 Thread Heikki Krogerus
Functions typec_mux_get() and typec_switch_get() already make sure that the mux device reference count is incremented, but the same must be done to the driver module as well to prevent the drivers from being unloaded in the middle of operation. This fixes a potential "BUG: unable to handle kernel

[PATCH v3 02/10] usb: roles: Handle driver reference counting

2018-09-04 Thread Heikki Krogerus
This fixes potential "BUG: unable to handle kernel paging request at ..." from happening. Fixes: fde0aa6c175a ("usb: common: Small class for USB role switches") Cc: Signed-off-by: Heikki Krogerus --- drivers/usb/common/roles.c | 15 --- 1 file changed, 12 insertions(+), 3

Fw: Aw: Re: keyboard-problem on bpi-r2 since 4.17

2018-09-04 Thread Frank Wunderlich
Hi, thank you for quick answer. i will try it, but afaik git bisect resets full git tree to the commit, right? i need to do some adjustments to get system booting (config,swap mmc in dts).   is there another way to show more debug-messages?   i have a working 4.16-tree, maybe i can merge newer

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Johan Hovold
On Tue, Sep 04, 2018 at 12:21:09PM +0200, Oliver Neukum wrote: > On Di, 2018-09-04 at 11:31 +0200, Johan Hovold wrote: > > On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > > > For those people who run with panic_on_warn a WARN() triggered > > > from user space is a DOS. It is worth

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Oliver Neukum
On Di, 2018-09-04 at 11:31 +0200, Johan Hovold wrote: > On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > > For those people who run with panic_on_warn a WARN() triggered > > from user space is a DOS. It is worth returning to dev_err() > > I think this should be dev_warn() unless

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Johan Hovold
On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > For those people who run with panic_on_warn a WARN() triggered > from user space is a DOS. It is worth returning to dev_err() I think this should be dev_warn() unless you want to bring back the returning of errors on these

Re: Nothing in /sys/class/udc

2018-09-04 Thread Felipe Balbi
Hi, Ranran writes: > On Mon, Sep 3, 2018 at 4:50 PM Ranran wrote: >> >> On Mon, Sep 3, 2018 at 4:22 PM Ranran wrote: >> > >> > On Mon, Sep 3, 2018 at 3:40 PM Greg KH wrote: >> > > >> > > On Mon, Sep 03, 2018 at 09:39:14AM +0300, Ranran wrote: >> > > > Hello, >> > > > >> > > > I try to add

[PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Oliver Neukum
For those people who run with panic_on_warn a WARN() triggered from user space is a DOS. It is worth returning to dev_err() Signed-off-by: Oliver Neukum Fixes: 0cb54a3e47cb4baf0bc7463f0a64cfeae5e35697 Reported-by: syzbot+843efa30c8821bd69...@syzkaller.appspotmail.com --- drivers/usb/core/urb.c

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Hans de Goede
Hi, On 04-09-18 09:44, Heikki Krogerus wrote: On Tue, Sep 04, 2018 at 09:40:35AM +0200, Hans de Goede wrote: HI, On 04-09-18 09:37, Heikki Krogerus wrote: Hi Hans, On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: Hi, On 03-09-18 15:36, Heikki Krogerus wrote: PI3USB30532 is

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Heikki Krogerus
On Tue, Sep 04, 2018 at 09:40:35AM +0200, Hans de Goede wrote: > HI, > > On 04-09-18 09:37, Heikki Krogerus wrote: > > Hi Hans, > > > > On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 03-09-18 15:36, Heikki Krogerus wrote: > > > > PI3USB30532 is used for

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Hans de Goede
HI, On 04-09-18 09:37, Heikki Krogerus wrote: Hi Hans, On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: Hi, On 03-09-18 15:36, Heikki Krogerus wrote: PI3USB30532 is used for muxing the port to DisplayPort on CHT platforms, so changing the connection ID so that the mux will get

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Heikki Krogerus
Hi Hans, On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: > Hi, > > On 03-09-18 15:36, Heikki Krogerus wrote: > > PI3USB30532 is used for muxing the port to DisplayPort on > > CHT platforms, so changing the connection ID so that the > > mux will get assigned to the alternate mode

Re: [PATCH] usb/typec: fix kernel-doc notation warning for typec_match_altmode

2018-09-04 Thread Heikki Krogerus
On Mon, Sep 03, 2018 at 12:58:35PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Fix kernel-doc warning for missing function parameter 'mode' description: > > ../drivers/usb/typec/bus.c:268: warning: Function parameter or member 'mode' > not described in 'typec_match_altmode' > > Also