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

2018-09-03 Thread Greg KH
On Tue, Sep 04, 2018 at 06:39:20AM +0200, Frank Wunderlich wrote: > >   > > Hi, > > i have problems with usb-keyboard on bananapi-r2 since 4.17. same keyboard > works till 4.16. > In 4.19-rc1 same issue occours. Keyboard is recognized and on keypress it is > disconnected > and connected

Re: [PATCH 00/25] Change tty_port(standard)_install's return type

2018-09-03 Thread Sam Ravnborg
Hi Jaejoong. > Change return type for tty functions. Patch No.01 > tty: Change return type to void Adding this patch first will generate a lot of warnings until all users are updated. It is usual practice to prepare all users and then apply the infrastructure changes as the last patch. Then

Fw: keyboard-problem on bpi-r2 since 4.17

2018-09-03 Thread Frank Wunderlich
  Hi, i have problems with usb-keyboard on bananapi-r2 since 4.17. same keyboard works till 4.16. In 4.19-rc1 same issue occours. Keyboard is recognized and on keypress it is disconnected and connected again without anything written to console. dmesg (printk-debuglevel=8) looks like this:

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

2018-09-03 Thread Hans de Goede
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 device and not the port device. Connection ID "typec-mux" is now reserved for Accessory

Re: Nothing in /sys/class/udc

2018-09-03 Thread Ranran
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 gadget configfs as described in: >

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

2018-09-03 Thread Andy Shevchenko
On Mon, Sep 3, 2018 at 4:37 PM Heikki Krogerus wrote: > > Hi, > > I've now removed the conditional creation of the mux device, and the > connection for it that was checked in intel_cht_int33fe.c. I'm instead > making the intel_cht_int33fe driver depend on the mux drivers. I also > added a trivial

Re: Nothing in /sys/class/udc

2018-09-03 Thread Ranran
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 gadget configfs as described in: > > >

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

2018-09-03 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 | 11 ++- 1 file changed, 2 insertions(+), 9

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

2018-09-03 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 v2 04/10] drivers: base: Helpers for adding device connection descriptions

2018-09-03 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 v2 02/10] usb: roles: Handle driver reference counting

2018-09-03 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

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

2018-09-03 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 v2 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Heikki Krogerus
Hi, I've now removed the conditional creation of the mux device, and the connection for it that was checked in intel_cht_int33fe.c. I'm instead making the intel_cht_int33fe driver depend on the mux drivers. I also added a trivial cleanup patch (patch 10/10) for the fusb302.c to this series, and

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

2018-09-03 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 v2 08/10] usb: typec: class: Don't use port parent for getting mux handles

2018-09-03 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 v2 01/10] usb: typec: Take care of driver module reference counting

2018-09-03 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 v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-03 Thread Heikki Krogerus
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 device and not the port device. Connection ID "typec-mux" is now reserved for Accessory Modes. Signed-off-by: Heikki Krogerus ---

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

2018-09-03 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

Re: Nothing in /sys/class/udc

2018-09-03 Thread Ranran
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 gadget configfs as described in: > > https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt > > Yet, I find nothing in /sys/class/udc: > > > >

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Heikki Krogerus
On Mon, Sep 03, 2018 at 03:08:46PM +0300, Andy Shevchenko wrote: > On Mon, Sep 3, 2018 at 10:19 AM Heikki Krogerus > wrote: > > > > On Mon, Sep 03, 2018 at 09:17:13AM +0300, Andy Shevchenko wrote: > > > On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus > > > wrote: > > > > > > > > Hi, > > > > > >

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

2018-09-03 Thread Mathias Nyman
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 new endpoints. All this is done by xHC when usb

Re: Nothing in /sys/class/udc

2018-09-03 Thread Greg KH
On Mon, Sep 03, 2018 at 09:39:14AM +0300, Ranran wrote: > Hello, > > I try to add gadget configfs as described in: > https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt > Yet, I find nothing in /sys/class/udc: > > user@user-VirtualBox:~/tegra$ ls /sys/class/udc/ -al > total 0 >

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

2018-09-03 Thread Mathias Nyman
On 31.08.2018 17:39, Alan Stern wrote: On Fri, 31 Aug 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

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Andy Shevchenko
On Mon, Sep 3, 2018 at 10:19 AM Heikki Krogerus wrote: > > On Mon, Sep 03, 2018 at 09:17:13AM +0300, Andy Shevchenko wrote: > > On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus > > wrote: > > > > > > Hi, > > > > > > The second last patch in this series will make it possible to use > > > multiport

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Heikki Krogerus
Hi, On Mon, Sep 03, 2018 at 10:01:52AM +0200, Hans de Goede wrote: > Besides my comments on patches 3 and 4, one small nitpick, > platform is spelled wrong (as plarform) in the subject of > a number of the patches. Thanks Hans. I'll fix them. Cheers, -- heikki

Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

2018-09-03 Thread Heikki Krogerus
On Mon, Sep 03, 2018 at 10:01:01AM +0200, Hans de Goede wrote: > This patch and "[PATCH 3/8] plarform: x86: intel_cht_int33fe: Use the USB > role switch conditionally" > both assume that the mux will be in host mode when Linux boots, so we do not > need to > touch it. I'm not sure that is a

Re: [PATCH 0/9] usb: dwc2: device: Add service interval support

2018-09-03 Thread Minas Harutyunyan
On 8/29/2018 8:58 PM, Grigor Tovmasyan wrote: > This patch set adds Service Interval support for device mode. > > When this mode is enabled core is able to send data any u(f) in current > service interval. > > Also in this mode core is able to accept L1 tokens for ISOC IN endpoints. > >

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Hans de Goede
Hi, On 31-08-18 16:20, Heikki Krogerus wrote: Hi, The second last patch in this series will make it possible to use multiport USB Type-C and PD controllers with the muxes. The CHT connections are simply adapted to that. The rest of the series will mainly allow us to use the USB Type-C on CHT

Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

2018-09-03 Thread Hans de Goede
Hi, On 31-08-18 16:20, Heikki Krogerus wrote: Only create thre Intel role mux device if the platform has USB peripheral controller PCI device. While here, enable the role mux on Apollo Lake platforms. Signed-off-by: Heikki Krogerus Cc: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 20

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Heikki Krogerus
On Mon, Sep 03, 2018 at 09:17:13AM +0300, Andy Shevchenko wrote: > On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus > wrote: > > > > Hi, > > > > The second last patch in this series will make it possible to use > > multiport USB Type-C and PD controllers with the muxes. The CHT > > connections are

Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

2018-09-03 Thread Heikki Krogerus
On Mon, Sep 03, 2018 at 09:01:47AM +0300, Andy Shevchenko wrote: > On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus > wrote: > > > > Only create thre Intel role mux device if the platform has > > USB peripheral controller PCI device. > > > > While here, enable the role mux on Apollo Lake

Nothing in /sys/class/udc

2018-09-03 Thread Ranran
Hello, I try to add gadget configfs as described in: https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt Yet, I find nothing in /sys/class/udc: user@user-VirtualBox:~/tegra$ ls /sys/class/udc/ -al total 0 drwxr-xr-x 2 root root 0 Sep 3 00:30 . drwxr-xr-x 58 root root 0 Sep 3

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Andy Shevchenko
On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus wrote: > > Hi, > > The second last patch in this series will make it possible to use > multiport USB Type-C and PD controllers with the muxes. The CHT > connections are simply adapted to that. The rest of the series will > mainly allow us to use the

Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

2018-09-03 Thread Andy Shevchenko
On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus wrote: > > Only create thre Intel role mux device if the platform has > USB peripheral controller PCI device. > > While here, enable the role mux on Apollo Lake platforms. > +static int xhci_pci_board_has_udc(void) > +{ > + struct pci_dev