[RESEND PATCH] phy: phy-mtk-tphy: add set_mode callback

2017-10-10 Thread Chunfeng Yun
This is used to force PHY with USB OTG function to enter a specific mode, and override OTG IDPIN(or IDDIG) signal. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++ 1 file changed, 39 insertions(+) diff

Re: Dell thunderbolt docking station not working

2017-10-10 Thread Stephen Hemminger
On Tue, 10 Oct 2017 22:31:34 +0300 Mika Westerberg wrote: > On Tue, Oct 10, 2017 at 12:11:49PM -0700, Stephen Hemminger wrote: > > The Dell thunderbolt docking brick (TB16) does not appear to be fully > > supported in Linux. > > When I connect my Dell XPS 13

Re: Dell thunderbolt docking station not working

2017-10-10 Thread Mika Westerberg
On Tue, Oct 10, 2017 at 12:11:49PM -0700, Stephen Hemminger wrote: > The Dell thunderbolt docking brick (TB16) does not appear to be fully > supported in Linux. > When I connect my Dell XPS 13 (running Ubuntu) to the dock, the multiple > displays work > correctly but the USB keyboard, mouse and

Re: [PATCH 2/2] usb: renesas_usbhs: add support for R-Car D3

2017-10-10 Thread Rob Herring
On Tue, Oct 03, 2017 at 08:09:14PM +0900, Yoshihiro Shimoda wrote: > This patch adds support for R-Car D3. This SoC needs to release > the PLL reset by the UGCTRL register. So, since this is not the same > as other R-Car Gen3 SoCs, this patch adds a new type as > "USBHS_TYPE_RCAR_GEN3_WITH_PLL". >

[PATCH] USB: serial: garmin_gps: Convert timers to use timer_setup()

2017-10-10 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Johan Hovold Cc: Allen Pais Cc: Greg Kroah-Hartman

Re: [PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Andrey Konovalov
On Tue, Oct 10, 2017 at 4:33 PM, Takashi Iwai wrote: > On Tue, 10 Oct 2017 16:00:25 +0200, > Andrey Konovalov wrote: >> >> On Tue, Oct 10, 2017 at 3:38 PM, Takashi Iwai wrote: >> > As syzkaller spotted, currently bcd2000 driver submits a URB with the >> > fixed EP

[PATCH] xhci: Cope with VIA VL805 readahead

2017-10-10 Thread Robin Murphy
The VIA VL805 host controller is well-known for causing problems on systems with IOMMUs enabled, ranging from triggering endless streams of fault messages to locking itself up completely. It appears that the root of the problem might be an over-aggressive prefetching of TRBs, wherein consuming

Re: [PATCH 3/8] Documentation: fix input related doc refs

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 19:36:23 +0200, Tom Saeger wrote: > > Make `input` document refs valid including: > - joystick > - joystick-parport > > Signed-off-by: Tom Saeger For the sound part: Reviewed-by: Takashi Iwai thanks, Takashi > --- >

[PATCH 7/8] Documentation: fix usb related doc refs

2017-10-10 Thread Tom Saeger
Update ref to usb proc_usb_info.txt. Signed-off-by: Tom Saeger --- Documentation/driver-api/usb/usb.rst | 4 +--- Documentation/networking/cdc_mbim.txt | 4 ++-- Documentation/usb/gadget-testing.txt | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 3/8] Documentation: fix input related doc refs

2017-10-10 Thread Tom Saeger
Make `input` document refs valid including: - joystick - joystick-parport Signed-off-by: Tom Saeger --- Documentation/admin-guide/kernel-parameters.txt | 10 +- Documentation/hid/hiddev.txt| 2 +- Documentation/input/devices/xpad.rst

Re: VL805 xHCI DMA read faults

2017-10-10 Thread Robin Murphy
On 10/10/17 16:51, David Laight wrote: > From: Robin Murphy >> Sent: 10 October 2017 16:25 > ... >>> That could 'just' be the hardware doing a 'readahead' of the ring. >>> Somewhat annoying if it is doing that across page boundaries. >> >>> Although, in that case, the read values wouldn't be used

Re: [PATCH] usb: typec: tcpm: reset the port on removal

2017-10-10 Thread Guenter Roeck
On Tue, Oct 10, 2017 at 04:40:33PM +0300, Heikki Krogerus wrote: > If a port is unregistered, all the devices attached to it > must be unregistered as well. This will also make sure VBUS > and VCONN are disabled. > > Signed-off-by: Heikki Krogerus Makes sense.

RE: VL805 xHCI DMA read faults

2017-10-10 Thread David Laight
From: Robin Murphy > Sent: 10 October 2017 16:25 ... > > That could 'just' be the hardware doing a 'readahead' of the ring. > > Somewhat annoying if it is doing that across page boundaries. > > > Although, in that case, the read values wouldn't be used because the > > last TRB is a link. > > So

Re: VL805 xHCI DMA read faults

2017-10-10 Thread Robin Murphy
On 10/10/17 15:24, David Laight wrote: > From: Mathias Nyman >> Sent: 10 October 2017 15:13 > ... >> [ 428.409645] print_req_error: I/O error, dev sdb, sector 128 >> [ 428.426612] arm-smmu 2b50.iommu: Unhandled context fault: fsr=0x8, >> iova=0xff0b1000, >> fsynr=0x183, cb=0 >> >> a ring

Re: [PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 16:00:25 +0200, Andrey Konovalov wrote: > > On Tue, Oct 10, 2017 at 3:38 PM, Takashi Iwai wrote: > > As syzkaller spotted, currently bcd2000 driver submits a URB with the > > fixed EP without checking whether it's actually available, which may > > result in a

RE: VL805 xHCI DMA read faults

2017-10-10 Thread David Laight
From: Mathias Nyman > Sent: 10 October 2017 15:13 ... > [ 428.409645] print_req_error: I/O error, dev sdb, sector 128 > [ 428.426612] arm-smmu 2b50.iommu: Unhandled context fault: fsr=0x8, > iova=0xff0b1000, > fsynr=0x183, cb=0 > > a ring segment is 256 TRBS, each *16 bytes, that ring last

Re: [PATCH v2] HID: usbhid: fix out-of-bounds bug

2017-10-10 Thread Alan Stern
On Tue, 10 Oct 2017, Jaejoong Kim wrote: > Hi, > > To. Jiri, Alan, > > Could you please review this patch? > > To. Andey, > > Could you please test with this patch for KASAN OOB error? > > Thanks, jaejoong > > 2017-09-28 19:16 GMT+09:00 Jaejoong Kim : > > The hid

Re: VL805 xHCI DMA read faults

2017-10-10 Thread Mathias Nyman
On 10.10.2017 12:41, David Laight wrote: From: Robin Murphy Sent: 09 October 2017 18:39 ... - without the IOMMU, block sizes >=128K all settle down into a suspiciously-periodic error every 2048 sectors. That stinks of being a problem where either the link TRB is part way through a USB

Re: [PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Andrey Konovalov
On Tue, Oct 10, 2017 at 3:38 PM, Takashi Iwai wrote: > As syzkaller spotted, currently bcd2000 driver submits a URB with the > fixed EP without checking whether it's actually available, which may > result in a kernel warning like: > usb 1-1: BOGUS urb xfer, pipe 1 != type 3 >

Re: [PATCH 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-10 Thread Takashi Iwai
On Tue, 10 Oct 2017 15:53:49 +0200, Greg KH wrote: > > On Tue, Oct 10, 2017 at 03:38:11PM +0200, Takashi Iwai wrote: > > This patch adds a new helper function to perform a sanity check of the > > given URB to see whether it contains a valid endpoint. It's a light- > > weight version of what

Re: [PATCH 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-10 Thread Greg KH
On Tue, Oct 10, 2017 at 03:38:11PM +0200, Takashi Iwai wrote: > This patch adds a new helper function to perform a sanity check of the > given URB to see whether it contains a valid endpoint. It's a light- > weight version of what usb_submit_urb() does, but without the kernel > warning followed

[PATCH] usb: typec: tcpm: reset the port on removal

2017-10-10 Thread Heikki Krogerus
If a port is unregistered, all the devices attached to it must be unregistered as well. This will also make sure VBUS and VCONN are disabled. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: linux-stable 4.11.y – xhci probe failed because of missing patches

2017-10-10 Thread Greg KH
On Tue, Oct 10, 2017 at 02:50:48PM +0700, Tung Vuong Nguyen wrote: > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is > for the sole use of the intended recipient(s) and contains information that > is confidential and proprietary to Applied Micro Circuits Corporation or

Re: linux-stable 4.11.y – xhci probe failed because of missing patches

2017-10-10 Thread Greg KH
On Tue, Oct 10, 2017 at 02:50:48PM +0700, Tung Vuong Nguyen wrote: > Hi everyone, > > Since kernel 4.11, there are a list of patches from Sriram (refer > https://lkml.org/lkml/2016/11/10/51) that change the way DMA is > inherited from sysdev. They have been accepted and available in >

[PATCH 0/9] sound: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
Hi, this is a patchset to cover the codes that may submit URBs containing invalid EPs without validation, which result in the kernel warning from the USB core. The first patch adds a new helper for simplifying the EP check, and the rest applies it at needed places. USB devs: could you check the

[PATCH 7/9] ALSA: hiface: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
hiface usb-audio driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai ---

[PATCH 5/9] ALSA: usb-audio: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
USB-audio driver may set up a URB containing the fixed EP without validating its presence for some non-class-compliant devices. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the call of the new sanity-check helper for URBs. The checks are

[PATCH 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
As syzkaller spotted, currently bcd2000 driver submits a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 1 != type 3 [ cut here ] WARNING: CPU: 0 PID: 1846 at

[PATCH 9/9] ALSA: line6: Add yet more sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
There are a few other places calling usb_submit_urb() with the URB composed from the fixed endpoint without validation. For avoiding the spurious kernel warnings, add the sanity checks to appropriate places. Signed-off-by: Takashi Iwai --- sound/usb/line6/driver.c | 23

[PATCH 8/9] ALSA: caiaq: Add yet more sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
A few other places in caiaq driver have the URB handling with the fixed endpoints without checking the validity, too. Add the sanity check with the new helper function at each appropriate place for avoiding the spurious kernel warnings due to invalid EPs. Signed-off-by: Takashi Iwai

[PATCH 6/9] ALSA: usx2y: Add sanity checks for invalid EPs

2017-10-10 Thread Takashi Iwai
usx2y driver sets up URBs containing the fixed endpoints without validation. This may end up with an oops-like kernel warning when submitted. For avoiding it, this patch adds the calls of the new sanity-check helper for URBs. Signed-off-by: Takashi Iwai ---

[PATCH 4/9] ALSA: line6: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
As syzkaller spotted, currently line6 drivers submit a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 [ cut here ] WARNING: CPU: 0 PID: 24 at

[PATCH 3/9] ALSA: caiaq: Add a sanity check for invalid EPs

2017-10-10 Thread Takashi Iwai
As syzkaller spotted, currently caiaq driver submits a URB with the fixed EP without checking whether it's actually available, which may result in a kernel warning like: usb 1-1: BOGUS urb xfer, pipe 3 != type 1 [ cut here ] WARNING: CPU: 1 PID: 1150 at

[PATCH 1/9] usb: core: Add a helper function to check the validity of EP type in URB

2017-10-10 Thread Takashi Iwai
This patch adds a new helper function to perform a sanity check of the given URB to see whether it contains a valid endpoint. It's a light- weight version of what usb_submit_urb() does, but without the kernel warning followed by the stack trace, just returns an error code. Especially for a

usb/net/asix: null-ptr-deref in asix_suspend

2017-10-10 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (4.14-rc4). It seems that priv ends up being NULL. usb 1-1: New USB device found, idVendor=0557, idProduct=2009 usb 1-1: New USB device strings: Mfr=204, Product=1,

Re: linux-stable 4.11.y – xhci probe failed because of missing patches

2017-10-10 Thread Mathias Nyman
On 10.10.2017 10:50, Tung Vuong Nguyen wrote: Hi everyone, Since kernel 4.11, there are a list of patches from Sriram (refer https://lkml.org/lkml/2016/11/10/51) that change the way DMA is inherited from sysdev. They have been accepted and available in torvalds/linux.git already. Below are list

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-10 Thread Anders Montonen
Hi, On Mon, 9 Oct 2017, Minas Harutyunyan wrote: On 10/9/2017 5:15 PM, Anders Montonen wrote: We have a custom Altera Cyclone V SoCFPGA board, where connecting a particular brand of USB memory sticks produces and enless stream of console errors messages until it is removed from the system.

Re: [PATCH v2] HID: usbhid: fix out-of-bounds bug

2017-10-10 Thread Andrey Konovalov
On Tue, Oct 10, 2017 at 9:25 AM, Jaejoong Kim wrote: > Hi, > > To. Jiri, Alan, > > Could you please review this patch? > > To. Andey, > > Could you please test with this patch for KASAN OOB error? Hi! Yes, your patch fixes the issue. Thanks! Tested-by: Andrey Konovalov

RE: [PATCH v2] extcon: Split out extcon header file for consumer and provider device

2017-10-10 Thread Yoshihiro Shimoda
Hi, > From: Chanwoo Choi, Sent: Tuesday, October 10, 2017 7:18 PM > > The extcon has two type of extcon devices as following. > - 'extcon provider deivce' adds new extcon device and detect the >state/properties of external connector. Also, it notifies the >state/properties to the extcon

Re: [PATCH v2] extcon: Split out extcon header file for consumer and provider device

2017-10-10 Thread Felipe Balbi
Hi, Chanwoo Choi writes: > The extcon has two type of extcon devices as following. > - 'extcon provider deivce' adds new extcon device and detect the >state/properties of external connector. Also, it notifies the >state/properties to the extcon consumer device. >

[PATCH v2] extcon: Split out extcon header file for consumer and provider device

2017-10-10 Thread Chanwoo Choi
The extcon has two type of extcon devices as following. - 'extcon provider deivce' adds new extcon device and detect the state/properties of external connector. Also, it notifies the state/properties to the extcon consumer device. - 'extcon consumer device' gets the change state/properties

RE: VL805 xHCI DMA read faults

2017-10-10 Thread David Laight
From: Robin Murphy > Sent: 09 October 2017 18:39 ... > > - without the IOMMU, block sizes >=128K all settle down into a > >suspiciously-periodic error every 2048 sectors. That stinks of being a problem where either the link TRB is part way through a USB packet or where a buffer fragment

Re: [bugzilla-dae...@bugzilla.kernel.org: [Bug 197159] New: Xhci host controller not responding starting kernel 4.13]

2017-10-10 Thread Mathias Nyman
On 10.10.2017 02:38, Bjorn Helgaas wrote: On Mon, Oct 09, 2017 at 10:45:39PM +0200, Mason wrote: On 09/10/2017 19:01, Bjorn Helgaas wrote: ... In that thread, Mason reported a regression that looks similar, but as far as I can tell, we never identified a root cause. 1) The problem Mason

Re: [PATCH 1/2 v2] typec: tcpm: Validate source and sink caps

2017-10-10 Thread Heikki Krogerus
Hi, On Mon, Oct 09, 2017 at 03:13:43PM -0700, Badhri Jagan Sridharan wrote: > The source and sink caps should follow the following rules. > This patch validates whether the src_caps/snk_caps adheres > to it. > > 6.4.1 Capabilities Message > A Capabilities message (Source Capabilities message or

linux-stable 4.11.y – xhci probe failed because of missing patches

2017-10-10 Thread Tung Vuong Nguyen
Hi everyone, Since kernel 4.11, there are a list of patches from Sriram (refer https://lkml.org/lkml/2016/11/10/51) that change the way DMA is inherited from sysdev. They have been accepted and available in torvalds/linux.git already. Below are list the patches: d64ff406e5("usb: dwc3: use

Re: [PATCH v2] HID: usbhid: fix out-of-bounds bug

2017-10-10 Thread Jaejoong Kim
Hi, To. Jiri, Alan, Could you please review this patch? To. Andey, Could you please test with this patch for KASAN OOB error? Thanks, jaejoong 2017-09-28 19:16 GMT+09:00 Jaejoong Kim : > The hid descriptor identifies the length and type of subordinate > descriptors for