Huawei integrated modem causes instant resume from suspend on Acer P648-G3

2017-09-26 Thread Daniel Drake
Hi, The Acer TravelMate P648-G3 laptop includes this integrated Huawei 4G modem on the USB bus: T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 5 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs= 3 P: Vendor=12d1 ProdID=15c3 Rev= 1.02 S: Manufacturer=Huawei Technologie

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

2017-09-26 Thread Alan Stern
On Wed, 27 Sep 2017, Jaejoong Kim wrote: > Hi, Alan, > > Thanks for the review. > > 2017-09-26 23:18 GMT+09:00 Alan Stern : > > On Tue, 26 Sep 2017, Jaejoong Kim wrote: > > > >> The starting address of the hid descriptor is obtained via > >> usb_get_extra_descriptor(). If the hid descriptor has

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

2017-09-26 Thread Jaejoong Kim
Hi, Alan, Thanks for the review. 2017-09-26 23:18 GMT+09:00 Alan Stern : > On Tue, 26 Sep 2017, Jaejoong Kim wrote: > >> The starting address of the hid descriptor is obtained via >> usb_get_extra_descriptor(). If the hid descriptor has the wrong size, it >> is possible to access the wrong addres

[PATCH 2/5] USB: dummy-hcd: fix infinite-loop resubmission bug

2017-09-26 Thread Alan Stern
The dummy-hcd HCD/UDC emulator tries not to do too much work during each timer interrupt. But it doesn't try very hard; currently all it does is limit the total amount of bulk data transferred. Other transfer types aren't limited, and URBs that transfer no data (because of an error, perhaps) don'

[PATCH 3/5] USB: dummy-hcd: Fix erroneous synchronization change

2017-09-26 Thread Alan Stern
A recent change to the synchronization in dummy-hcd was incorrect. The issue was that dummy_udc_stop() contained no locking and therefore could race with various gadget driver callbacks, and the fix was to add locking and issue the callbacks with the private spinlock held. UDC drivers aren't suppo

[PATCH 4/5] USB: dummy-hcd: remove unsupported isochronous endpoints

2017-09-26 Thread Alan Stern
The dummy-hcd driver doesn't support emulation of isochronous transfers. Therefore it doesn't need to export isochronous endpoint descriptors; they can be commented out. Also, the comments in the source code don't express clearly enough the fact that isochronous isn't supported. They need to be

[PATCH 5/5] USB: dummy-hcd: bandwidth limits for non-bulk transfers

2017-09-26 Thread Alan Stern
Part of the emulation performed by dummy-hcd is accounting for bandwidth utilization. The total amount of data transferred in a single frame is supposed to be no larger than an actual USB connection could accommodate. Currently the driver performs bandwidth limiting only for bulk transfers; contr

[PATCH 0/5] USB: dummy-hcd: multiple fixes

2017-09-26 Thread Alan Stern
Felipe and Greg: In the following series of changes for the dummy-hcd driver, the first three patches correct issues that are serious enough to merit inclusion in the -stable kernels: 1/5 fixes a bug that prevents g_mass_storage from working correctly in the default configuration

[PATCH 1/5] USB: dummy-hcd: fix connection failures (wrong speed)

2017-09-26 Thread Alan Stern
The dummy-hcd UDC driver is not careful about the way it handles connection speeds. It ignores the module parameter that is supposed to govern the maximum connection speed and it doesn't set the HCD flags properly for the case where it ends up running at full speed. The result is that in many cas

Re: Type-C port on the Asmedia ASM1142

2017-09-26 Thread Adrian Bocaniciu
On Tue, 26 Sep 2017 09:53:23 +0300 Mathias Nyman wrote: > > Do you have any more details, logs or documentation about these 10Gbps > ASM1142 bugs in xHCI driver? > I'd be interested in getting that fixed > > Thanks > Mathias I know exactly what must be changed in the XHCI driver, but I did no

Re: [PATCH v6] xhci : AMD Promontory USB disable port support

2017-09-26 Thread Kai-Heng Feng
On Mon, Sep 25, 2017 at 4:16 PM, Mathias Nyman wrote: > On 25.09.2017 10:08, Joe Lee wrote: >> >> From: Joe Lee >> >> For AMD Promontory xHCI host, >> although you can disable USB 2.0 ports in BIOSsettings, >> those ports will be enabled anyway after you remove a device on >> that port and re-plu

Re: [PATCH] usb: ohci-sa1111: convert shutdown method to native device_driver

2017-09-26 Thread Russell King - ARM Linux
On Tue, Sep 26, 2017 at 11:35:32AM -0400, Alan Stern wrote: > On Tue, 26 Sep 2017, Russell King - ARM Linux wrote: > > > On Tue, Sep 26, 2017 at 10:35:23AM -0400, Alan Stern wrote: > > > On Tue, 26 Sep 2017, Russell King wrote: > > > > Convert the shutdown method to use the device_driver shutdown

Re: [PATCH] usb: ohci-sa1111: convert shutdown method to native device_driver

2017-09-26 Thread Alan Stern
On Tue, 26 Sep 2017, Russell King - ARM Linux wrote: > On Tue, Sep 26, 2017 at 10:35:23AM -0400, Alan Stern wrote: > > On Tue, 26 Sep 2017, Russell King wrote: > > > Convert the shutdown method to use the device_driver shutdown function > > > pointer rather than a private bus-type shutdown. This

Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

2017-09-26 Thread Doug Anderson
Hi On Mon, Sep 25, 2017 at 6:09 PM, Grant Grundler wrote: > This linksys dongle by default comes up in cdc_ether mode. > This patch allows r8152 to claim the device: >Bus 002 Device 002: ID 13b1:0041 Linksys > > Signed-off-by: Grant Grundler > --- > drivers/net/usb/cdc_ether.c | 8

Re: [PATCH] usb: ohci-sa1111: convert shutdown method to native device_driver

2017-09-26 Thread Russell King - ARM Linux
On Tue, Sep 26, 2017 at 10:35:23AM -0400, Alan Stern wrote: > On Tue, 26 Sep 2017, Russell King wrote: > > Convert the shutdown method to use the device_driver shutdown function > > pointer rather than a private bus-type shutdown. This is the only user > > for SA bus types, so having the suppo

RE: [PATCH 10/12] staging: typec: tcpci: update set_cc for different state

2017-09-26 Thread Jun Li
Hi > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:50 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_

Re: [PATCH] usb: ohci-sa1111: convert shutdown method to native device_driver

2017-09-26 Thread Alan Stern
On Tue, 26 Sep 2017, Russell King wrote: > Convert the shutdown method to use the device_driver shutdown function > pointer rather than a private bus-type shutdown. This is the only user > for SA bus types, so having the support code in the bus doesn't > make any sense. > > Signed-off-by: Ru

Re: Issue with Gadget UVC and dummy_hcd

2017-09-26 Thread Alan Stern
On Tue, 26 Sep 2017, Felipe Balbi wrote: > > Does uvc use isochronous transfers? I assume it would, since it's a > > video protocol. > > yes, it does :-) > > > dummy-hcd does not support isochronous. I don't know what would happen > > really? Then why is it registering iso endpoints to the

RE: [PATCH 07/12] typec: tcpm: add starting value for drp toggling

2017-09-26 Thread Jun Li
Hi > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:43 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_

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

2017-09-26 Thread Alan Stern
On Tue, 26 Sep 2017, Jaejoong Kim wrote: > The starting address of the hid descriptor is obtained via > usb_get_extra_descriptor(). If the hid descriptor has the wrong size, it > is possible to access the wrong address. So, before accessing the hid > descriptor, we need to check the entire size th

RE: [PATCH 06/12] staging: typec: tcpci: enable vbus detection

2017-09-26 Thread Jun Li
> -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:37 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_le

[PATCH] usb: ohci-sa1111: remove special sa1111 mmio accessors

2017-09-26 Thread Russell King
Remove the special SA MMIO accessors from the ohci-sa driver as their definition will be removed shortly. The SA accessors are barrierless, so use the _relaxed variants. Signed-off-by: Russell King --- drivers/usb/host/ohci-sa.c | 10 +- 1 file changed, 5 insertions(+),

RE: [PATCH 05/12] staging: typec: tcpci: register port before request irq

2017-09-26 Thread Jun Li
Hi > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:34 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_

RE: [PATCH 04/12] staging: typec: tcpci: support port config passed via dt

2017-09-26 Thread Jun Li
Hi > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:33 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_

RE: [PATCH 09/12] usb: typec: tcpm: only drives the connected cc line when attached

2017-09-26 Thread Jun Li
> -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 9:20 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o_le

Re: [PATCH 10/12] staging: typec: tcpci: update set_cc for different state

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: As we should keep the disconnected cc line to be open when attached, so update the set_cc interface accordingly for it. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 37 + 1 file changed, 21 insertions(+),

Re: [PATCH 07/12] typec: tcpm: add starting value for drp toggling

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. It does have a starting value. The patch changes the starting value to TYPEC_CC_RD (from currently one of the RP states) w

Re: [PATCH 06/12] staging: typec: tcpci: enable vbus detection

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: TCPCI implementation may need SW to enable VBUS detection to generate power status events. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/typec/tcpci.c

Re: [PATCH 05/12] staging: typec: tcpci: register port before request irq

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 11 +-- 1 file changed, 5

Re: [PATCH 04/12] staging: typec: tcpci: support port config passed via dt

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: User can define the typec port properties in tcpci node to setup the port config. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 89 +++ include/linux/usb/tcpm.h | 6 +-- 2 files changed, 85 inser

Re: [PATCH 01/12] usb: typec: add API to get port type and preferred role

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: This patch add 2 APIs to get port type and preferred role from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/typec.c | 45 + include/linux/usb/typec.h | 2 ++ 2 files changed, 47 insertion

Re: [PATCH 09/12] usb: typec: tcpm: only drives the connected cc line when attached

2017-09-26 Thread Guenter Roeck
On 09/26/2017 02:53 AM, Jun Li wrote: Hi, -Original Message- From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck Sent: Tuesday, September 26, 2017 3:17 PM To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; mark.rutl...@arm.com; heikki.kroge...@linux.intel

usb/net/lan78xx: use-after-free in lan78xx_write_reg

2017-09-26 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit e19b205be43d11bff638cad4487008c48d21c103 (4.14-rc2). == BUG: KASAN: use-after-free in lan78xx_write_reg.isra.21+0x1a8/0x1b0 Read of size 8 at addr

Re: Type-C port on the Asmedia ASM1142

2017-09-26 Thread Will Trives
On Tue, 26 Sep 2017 05:55:17 + Adrian Bocaniciu wrote: > Therefore, you either have a bad cable (there are many USB 2.0 cables > with Type C connectors) or your motherboard/BIOS has some weird > behavior. > > On the other hand, SuperSpeedPlus (10 Gb/s) does not work on ASM1142 > in Linux, be

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-09-26 Thread Jonathan Liu
Hi, On 26 September 2017 at 21:39, Jonathan Liu wrote: > This fixes a kernel oops when unloading the driver due to usb_put_phy > being called after usb_phy_generic_unregister when the device is > detached. Calling usb_phy_generic_unregister causes x->dev->driver to > be NULL in usb_put_phy and re

[PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-09-26 Thread Jonathan Liu
This fixes a kernel oops when unloading the driver due to usb_put_phy being called after usb_phy_generic_unregister when the device is detached. Calling usb_phy_generic_unregister causes x->dev->driver to be NULL in usb_put_phy and results in a NULL pointer dereference. As we are now explicitly ma

Re: [PATCH v2 0/4] Update MUSB CPPI 4.1 driver to correctly manage the DA8xx

2017-09-26 Thread Sekhar Nori
On Thursday 21 September 2017 12:56 AM, Alexandre Bailon wrote: > A couple of weeks ago, Sekhar reported a warning issue happening in > CPPI 4.1. The teardown sequence was not correctly programmed. > The caused was a couple of difference between the DSPS and the DA8xx. > These differences are the w

[PATCH] usb: ohci-sa1111: convert shutdown method to native device_driver

2017-09-26 Thread Russell King
Convert the shutdown method to use the device_driver shutdown function pointer rather than a private bus-type shutdown. This is the only user for SA bus types, so having the support code in the bus doesn't make any sense. Signed-off-by: Russell King --- drivers/usb/host/ohci-sa.c | 5 ++

[PATCH] usb: ohci-sa1111: use sa1111_get_irq() to obtain IRQ resources

2017-09-26 Thread Russell King
Use the provided sa_get_irq() to fetch the IRQ resources for the SA OHCI driver. Signed-off-by: Russell King --- drivers/usb/host/ohci-sa.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-sa.c b/drivers/usb/host/ohci-sa.c i

RE: [PATCH 02/12] usb: typec: add basic typec properties

2017-09-26 Thread Jun Li
Hi, > -Original Message- > From: Heikki Krogerus [mailto:heikki.kroge...@linux.intel.com] > Sent: Tuesday, September 26, 2017 4:23 PM > To: Jun Li > Cc: gre...@linuxfoundation.org; li...@roeck-us.net; robh...@kernel.org; > mark.rutl...@arm.com; yue...@google.com; o_leve...@orange.fr; Pete

RE: [PATCH 01/12] usb: typec: add API to get port type and preferred role

2017-09-26 Thread Jun Li
> -Original Message- > From: Heikki Krogerus [mailto:heikki.kroge...@linux.intel.com] > Sent: Tuesday, September 26, 2017 4:03 PM > To: Jun Li > Cc: gre...@linuxfoundation.org; li...@roeck-us.net; robh...@kernel.org; > mark.rutl...@arm.com; yue...@google.com; o_leve...@orange.fr; Peter >

RE: [PATCH 09/12] usb: typec: tcpm: only drives the connected cc line when attached

2017-09-26 Thread Jun Li
Hi, > -Original Message- > From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck > Sent: Tuesday, September 26, 2017 3:17 PM > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: yue...@google.com; o

Re: Issue with Gadget UVC and dummy_hcd

2017-09-26 Thread Felipe Balbi
Hi, Alan Stern writes: >> I have been trying to get a UVC gadget running through configfs and >> wired in to dummy_hcd. >> >> I have largely been following the instructions from the Tizen wiki. >> https://wiki.tizen.org/USB/Linux_USB_Layers/Configfs_Composite_Gadget/Usage_eq._to_g_webcam.ko >>

Re: [PATCH 02/12] usb: typec: add basic typec properties

2017-09-26 Thread Heikki Krogerus
On Tue, Sep 26, 2017 at 08:45:17AM +0800, Li Jun wrote: > port-type is required for any typec port; default-role is only required > for drp; power source capable needs src-pdos; power sink capable needs > snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw. > > Signed-off-by: Li Jun > --- > Documentatio

[PATCH resend 12/12] staging: typec: tcpci: move tcpci driver out of staging

2017-09-26 Thread Li Jun
Move TCPCI(Typec port controller interface) driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 14 -- drivers/staging/typec/Makefile | 1 - d

[PATCH resend 09/12] usb: typec: tcpm: only drives the connected cc line when attached

2017-09-26 Thread Li Jun
As we should only drive connected cc line to be the right state when attached, and keeps the other one to be open, so update the set_cc interface for that. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 +++- include/linux/usb/tcpm.h | 3 ++- 2 files changed, 13 insertions(+),

[PATCH resend 10/12] staging: typec: tcpci: update set_cc for different state

2017-09-26 Thread Li Jun
As we should keep the disconnected cc line to be open when attached, so update the set_cc interface accordingly for it. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/drivers/stag

[PATCH resend 11/12] staging: typec: tcpci: Only touch target bit when enable vconn

2017-09-26 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index c7c45d

[PATCH resend 07/12] typec: tcpm: add starting value for drp toggling

2017-09-26 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/driver

[PATCH resend 08/12] staging: typec: tcpci: correct drp toggling

2017-09-26 Thread Li Jun
Per tcpci spec 4.4.5.2 ROLE_CONTROL description: "the TCPM shall write B6 (DRP) =1b and the starting value of Rp/Rd to B3..0 (CC1/CC2) to indicate DRP autonomous toggling mode to the TCPC", so add CC1/CC2 setting, also we should issue COMMAND.Look4Connection to start it. Signed-off-by: Li Jun ---

[PATCH resend 06/12] staging: typec: tcpci: enable vbus detection

2017-09-26 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index 6d60

[PATCH resend 05/12] staging: typec: tcpci: register port before request irq

2017-09-26 Thread Li Jun
With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH resend 04/12] staging: typec: tcpci: support port config passed via dt

2017-09-26 Thread Li Jun
User can define the typec port properties in tcpci node to setup the port config. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 89 +++ include/linux/usb/tcpm.h | 6 +-- 2 files changed, 85 insertions(+), 10 deletions(-) diff --git a/dri

[PATCH resend 03/12] staging: typec: tcpci: add documentation for tcpci

2017-09-26 Thread Li Jun
TCPCI stands for typec port controller interface, its implementation has full typec port control with power delivery support, it's a standard i2c slave with GPIO input as irq interface, detail see spec "Universal Serial Bus Type-C Port Controller Interface Specification Revision 1.0, Version 1.1"

[PATCH resend 00/12] staging: typec: tcpci: move out of staging

2017-09-26 Thread Li Jun
This patch set attempts to move the tcpci driver out of staging by fix some tcpci driver issues and verified on NXP PTN5110, which is a standard tcpci typec port controller device with power delivery support, tested power source and sink with drp config. Li Jun (12): usb: typec: add API to get p

[PATCH resend 02/12] usb: typec: add basic typec properties

2017-09-26 Thread Li Jun
port-type is required for any typec port; default-role is only required for drp; power source capable needs src-pdos; power sink capable needs snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/typec.txt | 46 + 1

[PATCH resend 01/12] usb: typec: add API to get port type and preferred role

2017-09-26 Thread Li Jun
This patch add 2 APIs to get port type and preferred role from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/typec.c | 45 + include/linux/usb/typec.h | 2 ++ 2 files changed, 47 insertions(+) diff --git a/drivers/usb/typec/typec.

Re: [PATCH 01/12] usb: typec: add API to get port type and preferred role

2017-09-26 Thread Heikki Krogerus
Hi, On Tue, Sep 26, 2017 at 08:45:16AM +0800, Li Jun wrote: > This patch add 2 APIs to get port type and preferred role from firmware > description. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/typec.c | 45 + > include/linux/usb/typec.h | 2 +

Re: [PATCH v3 05/14] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-26 Thread Heikki Krogerus
Hi Hans, Sorry about the late response. On Fri, Sep 22, 2017 at 08:37:54PM +0200, Hans de Goede wrote: > Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by > USB device/host, resp. Type-C polarity/role/altmode mux drivers and > consumers to ensure that they agree on the me

Re: [PATCH] r8152: add Linksys USB3GIGV1 id

2017-09-26 Thread Greg KH
On Mon, Sep 25, 2017 at 01:17:32PM -0700, Grant Grundler wrote: > Correct. r8152 happens to claim the device before cdc_ether does - I > thought because cdc_ether is a class driver and only gets picked up > after vendor specific drivers are probed. Is that correct? Nope, there is not "priority" s

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

2017-09-26 Thread Jaejoong Kim
The starting address of the hid descriptor is obtained via usb_get_extra_descriptor(). If the hid descriptor has the wrong size, it is possible to access the wrong address. So, before accessing the hid descriptor, we need to check the entire size through the bLength field. It also shows how many c

Re: [PATCH 09/12] usb: typec: tcpm: only drives the connected cc line when attached

2017-09-26 Thread Guenter Roeck
On 09/25/2017 05:45 PM, Li Jun wrote: As we should only drive connected cc line to be the right state when attached, and keeps the other one to be open, so update the set_cc interface for that. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 +++- include/linux/usb/tcpm.h |

RE: [PATCH 12/12] staging: typec: tcpci: move tcpci driver out of staging

2017-09-26 Thread Jun Li
Hi, > -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, September 26, 2017 2:58 PM > To: Jun Li > Cc: li...@roeck-us.net; robh...@kernel.org; mark.rutl...@arm.com; > heikki.kroge...@linux.intel.com; yue...@google.com; o_leve...@orange.fr; > Peter Chen