[PATCH] usb: gadget: udc: fotg210-udc: Fix a sleep-in-atomic-context bug in fotg210_get_status()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep in an interrupt handler. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] fotg210_ep_queue(GFP_KERNEL) drivers/usb/gadget/udc/fotg210-udc.c, 744: fotg210_ep_queue in fotg210_get_status drivers/usb/gadget/udc/fotg210-udc.c, 768: fotg210_get

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Al Viro
On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > Acked-by: Darren Hart (VMware) > > As for a longer term solution, would it be possible to init fops in such > a way that the compat_ioctl call defaults to generic_compat_ioctl_ptrarg > so we don't have to duplicate this boilerplate

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread Darren Hart
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

Re: [PATCH 2/2] typec: tcpm: Add option to maintain current limit at Vsafe5V

2018-09-14 Thread Jack Pham
Hi Badhri, On Thu, Sep 13, 2018 at 04:38:10PM -0700, Badhri Jagan Sridharan wrote: > On Thu, Sep 13, 2018 at 10:07 AM Jack Pham wrote: > > On Thu, Sep 13, 2018 at 6:43 AM Badhri Jagan Sridharan > > > Yeah thats for the source. But for sink, Say if the source isnt PD, then, > > > sink initiated ha

Re: [PATCH] usb: gadget: udc: atmel: handle at91sam9rl PMC

2018-09-14 Thread Cristian Birsan
On 10.09.2018 23:12, Alexandre Belloni wrote: The at91sam9rl PMC is not quite the same as the at91sam9g45 one and now has its own compatible string. Add support for that. Fixes: 217bace8e548 ("ARM: dts: fix PMC compatible") Signed-off-by: Alexandre Belloni It looks good to me. Acked-by: C

Re: [PATCH v3] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-14 Thread Karoly Pados
Hi, Thanks again for the review. >> #include >> +#if defined(CONFIG_GPIOLIB) >> +#include >> +#endif > > Hmm. I already commented on this in v1. Yeah, and I changed it too, but I now realized I misunderstood your intentions. You want me to remove the conditional compilation completely, while

Re: [PATCH v3] USB: serial: ftdi_sio: implement GPIO support for FT-X devices

2018-09-14 Thread Johan Hovold
On Mon, Sep 10, 2018 at 07:43:22PM +0200, Karoly Pados wrote: > This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS > bitbanging mode. There is no conflict between the GPIO and VCP > functionality in this mode. Tested on FT230X and FT231X. > > As there is no way to request the cu

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-14 Thread David Sterba
On Wed, Sep 12, 2018 at 05:08:52PM +0200, Arnd Bergmann wrote: > The .ioctl and .compat_ioctl file operations have the same prototype so > they can both point to the same function, which works great almost all > the time when all the commands are compatible. > > One exception is the s390 architect

Re: [PATCH 01/10] usb: xhci-mtk: resume USB3 roothub first

2018-09-14 Thread Greg KH
On Thu, Sep 13, 2018 at 03:23:54PM +0300, Mathias Nyman wrote: > From: Chunfeng Yun > > Give USB3 devices a better chance to enumerate at USB3 speeds if > they are connected to a suspended host. > Porting from "671ffdff5b13 xhci: resume USB 3 roothub first" > > Signed-off-by: Chunfeng Yun > Sig

Re: [PATCH 07/10] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-09-14 Thread Greg KH
On Thu, Sep 13, 2018 at 03:24:00PM +0300, Mathias Nyman wrote: > From: Heikki Krogerus > > Intel Apollo Lake has the same internal USB role mux as > Intel Cherry Trail. > > Signed-off-by: Heikki Krogerus > Signed-off-by: Mathias Nyman > --- > drivers/usb/host/xhci-pci.c | 6 -- > 1 file c

Re: [PATCH 1/3] usb: xhci: tegra: Firmware header is little endian

2018-09-14 Thread Greg KH
On Fri, Sep 14, 2018 at 03:33:29PM +0300, Mathias Nyman wrote: > From: Thierry Reding > > The XUSB firmware header is in little endian byte order, so make the > fields __le32 and __le16 instead of u32 and u16 to avoid warnings from > sparse when the fields are used with the endian-aware __le32_to

Re: [PATCH 3/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-09-14 Thread Greg KH
On Fri, Sep 14, 2018 at 03:33:31PM +0300, Mathias Nyman wrote: > The workaround for missing CAS bit is also needed for xHC on Intel > sunrisepoint PCH. For more details see: > > Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 > > Signed-off-by: Mathias Nyman > --- > dri

Re: [PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-14 Thread Greg KH
On Fri, Sep 14, 2018 at 03:33:30PM +0300, Mathias Nyman wrote: > From: Anshuman Gupta > > When USB bus host controller root hub resumes from autosuspend, > it immediately tries to enter auto-suspend, but there can be a > scenario when root hub is resuming its usb2 ports, in that particular > case

[PATCH] usb: core: safely deal with the dynamic quirk lists

2018-09-14 Thread Harry Pan
Applying dynamic usbcore quirks in early booting when the slab is not yet ready would cause kernel panic of null pointer dereference because the quirk_count has been counted as 1 while the quirk_list was failed to allocate. i.e., [1.044970] BUG: unable to handle kernel NULL pointer dereference

[PATCH 3/3] xhci: Add missing CAS workaround for Intel Sunrise Point xHCI

2018-09-14 Thread Mathias Nyman
The workaround for missing CAS bit is also needed for xHC on Intel sunrisepoint PCH. For more details see: Intel 100/c230 series PCH specification update Doc #332692-006 Errata #8 Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/

[PATCH 0/3] xhci fixes for usb-linus

2018-09-14 Thread Mathias Nyman
Hi Greg A few xhci fixes for usb-linus, two powermanagenet related tunings, and one xhci tegra sparse warning fix. -Mathias Anshuman Gupta (1): xhci: Avoid USB autosuspend when resuming USB2 ports. Mathias Nyman (1): xhci: Add missing CAS workaround for Intel Sunrise Point xHCI Thierry Red

[PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-14 Thread Mathias Nyman
From: Anshuman Gupta When USB bus host controller root hub resumes from autosuspend, it immediately tries to enter auto-suspend, but there can be a scenario when root hub is resuming its usb2 ports, in that particular case USB host controller auto suspend fails since it is busy to resuming its us

[PATCH 1/3] usb: xhci: tegra: Firmware header is little endian

2018-09-14 Thread Mathias Nyman
From: Thierry Reding The XUSB firmware header is in little endian byte order, so make the fields __le32 and __le16 instead of u32 and u16 to avoid warnings from sparse when the fields are used with the endian-aware __le32_to_cpu() and __le16_to_cpu() accessors, respectively. Signed-off-by: Thier

[GIT PULL] USB driver fixes for 4.19-rc4

2018-09-14 Thread Greg KH
The following changes since commit 57361846b52bc686112da6ca5368d11210796804: Linux 4.19-rc2 (2018-09-02 14:37:30 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git tags/usb-4.19-rc4 for you to fetch changes up to df3aa13c7bbb307e172c3

Re: [PATCH 1/2] typec: tcpm: Do not disconnect link for self powered devices

2018-09-14 Thread Heikki Krogerus
Hi, On Thu, Sep 13, 2018 at 04:16:08PM -0700, Badhri Jagan Sridharan wrote: > > > You do need to introduce a new device property already. Then read the > > This would be part of usb-connector binding. right ? Yes, that is probable the correct place for that. It's not tcpm/tcpci specific. But I

RE: [PATCH] usbcore: Select UAC3 configuration for audio if present

2018-09-14 Thread Gopal, Saranya
Hi Oliver, > -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Oliver Neukum > Sent: Thursday, September 13, 2018 4:37 PM > To: Gopal, Saranya ; linux-usb@vger.kernel.org > Cc: K V, Abhilash ; Balaji, M ; > Regupathy, Rajara

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-14 Thread Johan Hovold
On Fri, Sep 14, 2018 at 09:53:31AM +0200, Kristian Evensen wrote: > Hi Johan, > On Fri, Sep 14, 2018 at 9:51 AM Johan Hovold wrote: > > Great, thanks for testing. Do you mind if I add your tested-by to the > > patch? > > Not at all, go right ahead! I should probably have replied to the > patch wi

Re: Inaccessible dual-role port on CherryTrail

2018-09-14 Thread Heikki Krogerus
Hi Rob, Adding Hans. Hans has become something of a Cherry Trail expert. On Thu, Sep 13, 2018 at 03:40:12PM -0700, Rob Weber wrote: > Hi linux-usb, > > I'm currently bringing up a custom board that uses a CherryTrail > processor and I'm having quite a bit of trouble accessing the dual-role > por

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-14 Thread Kristian Evensen
Hi Johan, On Fri, Sep 14, 2018 at 9:51 AM Johan Hovold wrote: > Great, thanks for testing. Do you mind if I add your tested-by to the > patch? Not at all, go right ahead! I should probably have replied to the patch with a Tested-by. Sorry about forgetting that. BR, Kristian

Re: [PATCH] option: Improve Quectel EP06 detection

2018-09-14 Thread Johan Hovold
On Thu, Sep 13, 2018 at 05:13:02PM +0200, Kristian Evensen wrote: > I just finished backporting + testing your patch with our 4.14-kernel > (mine is already there) and it works great. The driver correctly > handles different EP06-configurations. Great, thanks for testing. Do you mind if I add you

Re: Inaccessible dual-role port on CherryTrail

2018-09-14 Thread Rob Weber
On Fri, Sep 14, 2018 at 09:00:30AM +0200, Greg KH wrote: > > I'm running a 4.9.115 kernel built using Yocto with a few patches applied > > to enable HDMI audio. > > 4.9 is really old by now, and lots and lots of USB-C and dwc3 and xhci > changes have happened in the almost 2 years since that kerne

Re: Inaccessible dual-role port on CherryTrail

2018-09-14 Thread Greg KH
On Thu, Sep 13, 2018 at 03:40:12PM -0700, Rob Weber wrote: > Hi linux-usb, > > I'm currently bringing up a custom board that uses a CherryTrail > processor and I'm having quite a bit of trouble accessing the dual-role > port from Linux. > > Our system includes two USB 3.0-capable ports with Type-