[PATCH 1/1] usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered

2018-06-11 Thread Peter Chen
The port->logbuffer_head may be wrong if the two processes enters _tcpm_log at the mostly same time. The 2nd process enters _tcpm_log before the 1st process update the index, then the 2nd process will not allocate logbuffer, when the 2nd process tries to use log buffer, the index has already

[PATCH v3] usb: xhci: increase CRS timeout value

2018-06-11 Thread Ajay Gupta
Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fixing the issue by increasing the timeout limit to 100ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- Changes from v2->v3 Updated commit

[PATCH v2] usb: xhci: increase CRS timeout value

2018-06-11 Thread Ajay Gupta
Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fixing the issue by increasing the timeout limit to 55ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- drivers/usb/host/xhci.c | 7 ++-

Re: 4.16.14: kernel tried to execute NX-protected page [after USB device went to charging state]

2018-06-11 Thread Johan Hovold
[ +CC: linux-usb, even if this does not look like a USB issue ] On Sat, Jun 09, 2018 at 11:50:34AM +0200, Udo van den Heuvel wrote: > Hello, > > My Holus GPSport 245 was used to download a gpx track. Afterwards I > turned the device off while it was attached to USB so it could charge. > Later

Re: [PATCH v6] usb: gadget: udc: renesas_usb3: Add register of usb role switch

2018-06-11 Thread Heikki Krogerus
On Thu, May 31, 2018 at 03:11:33PM +0900, Yoshihiro Shimoda wrote: > This patch adds role switch support for R-Car SoCs into the USB 3.0 > peripheral driver. Some R-Car SoCs (e.g. R-Car H3) have USB 3.0 > dual-role device controller which has the USB 3.0 xHCI host and > Renesas USB 3.0 peripheral.

Re: [PATCH v6 12/15] usb: typec: tcpm: set cc for drp toggling attach

2018-06-11 Thread Guenter Roeck
On 06/11/2018 05:29 AM, Heikki Krogerus wrote: On Mon, May 28, 2018 at 10:52:44AM +0800, Li Jun wrote: In case of drp toggling, we may need set correct cc value for role control after attach as it may never been set. Is this something that should be considered as a fix? The problem with

Re: [PATCH v6 06/15] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-11 Thread Guenter Roeck
On 05/27/2018 07:52 PM, Li Jun wrote: This patch adds support of get typec and power delivery config from firmware description. Signed-off-by: Li Jun Except for the nitpick. on top of Heikki's comments: Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm.c | 132

Re: [PATCH v6 14/15] staging: typec: tcpci: Only touch target bit when enable vconn

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:46AM +0800, Li Jun wrote: > We need regmap_update_bits to avoid touch any other bits when > enable or disable vconn. > > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/tcpci.c | 9 +++-- > 1

Re: [PATCH v6 13/15] staging: typec: tcpci: keep the disconnected cc line open

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:45AM +0800, Li Jun wrote: > While set polarity, we should keep the disconnected cc line to be > open. > > Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/tcpci.c | 18 ++ > 1 file changed, 14 insertions(+), 4

Re: [PATCH v6 10/15] staging: typec: tcpci: enable vbus detection

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:42AM +0800, Li Jun wrote: > TCPCI implementation may need SW to enable VBUS detection to generate > power status events. > > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun FWIW: Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/tcpci.c | 6 ++

Re: [PATCH v6 09/15] staging: typec: tcpci: register port before request irq

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:41AM +0800, Li Jun wrote: > From: Peter Chen > > 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 FWIW: Reviewed-by:

Re: [PATCH v6 08/15] staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:40AM +0800, Li Jun wrote: > As tcpm_register_port() and tcpci_register_port() never return > NULL and NULL is not a success in this case, use IS_ERR() to check > the return value of both. > > Signed-off-by: Li Jun FWIW: Reviewed-by: Heikki Krogerus > --- >

Re: [PATCH v6 07/15] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:39AM +0800, Li Jun wrote: > Since we will use config settings via device properties, so > remove the hard code tcpci_tcpc_config. > > Signed-off-by: Li Jun FWIW: Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/tcpci.c | 7 --- > 1 file changed, 7

Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB

2018-06-11 Thread Julien Massot
Hi Vivek, > I have a branch that's based on 4.17. You can pick that. > https://github.com/vivekgautam1/linux/commits/v4.17/db820c > Thanks a lot, I will test this branch. Julien -- *This email and any attachment thereto are confidential and intended solely for the use of the individual or

Re: [PATCH v6 03/15] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:35AM +0800, Li Jun wrote: > Add nxp ptn5110 typec controller compatible string: "nxp,ptn5110", > which is a standard tcpci chip with power delivery support. Meanwhile > remove "usb,tcpci" because it doesn't follow the binding format rule > and has not been used yet. >

Re: [PATCH v2] usb: xhci: remove the code build warning

2018-06-11 Thread gengdongjiu
Hi Mathias, This patch is ready to apply, It is great that this patch can be applied to 4.18. thanks a lot. On 2018/6/6 22:36, Dongjiu Geng wrote: > Initialize the 'err' variate to remove the build warning, > the warning is shown as below: > > drivers/usb/host/xhci-tegra.c: In function

Re: [PATCH v6 12/15] usb: typec: tcpm: set cc for drp toggling attach

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:44AM +0800, Li Jun wrote: > In case of drp toggling, we may need set correct cc value for role control > after attach as it may never been set. Is this something that should be considered as a fix? > Signed-off-by: Li Jun > --- > drivers/usb/typec/tcpm.c | 5 +

Re: [PATCH v6 11/15] typec: tcpm: add starting value for drp toggling

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:43AM +0800, 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. > > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus > --- >

Re: [PATCH v6 06/15] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:38AM +0800, Li Jun wrote: > This patch adds support of get typec and power delivery config from > firmware description. > > Signed-off-by: Li Jun This looks good to me, assuming that everybody agrees with the names used in the bindings. As usual, I would like

Re: [PATCH] usb: xhci: increase CRS timeout value

2018-06-11 Thread Mathias Nyman
On 11.06.2018 11:50, Oliver Neukum wrote: On Do, 2018-06-07 at 11:48 -0700, Ajay Gupta wrote: Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fix the issue by increasing the timeout limit to 55ms Hi,

Re: [PATCH v6 04/15] usb: typec: add fwnode to tcpc

2018-06-11 Thread Heikki Krogerus
On Mon, May 28, 2018 at 10:52:36AM +0800, Li Jun wrote: > Add fwnode handle to get the fwnode so we can get typec configs > it contains. > > Suggested-by: Heikki Krogerus > Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/tcpci.c | 7 +++ >

Re: [PATCH v6 05/15] usb: typec: add API to get typec basic port power and data config

2018-06-11 Thread Heikki Krogerus
Hi Jun, On Mon, May 28, 2018 at 10:52:37AM +0800, Li Jun wrote: > This patch adds 3 APIs to get the typec port power and data type, > and preferred power role by its name string. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/class.c | 50 > +++

Re: [PATCH 3/3] USB: xhci-hcd: Add get_resuming_ports method

2018-06-11 Thread Mathias Nyman
On 08.06.2018 23:59, Alan Stern wrote: This patch adds support for the new get_resuming_ports HCD method to the xhci-hcd driver. Signed-off-by: Alan Stern CC: Mathias Nyman Acked-by: Mathias Nyman -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a

Re: [PATCH] usb: cdc_acm: Add quirk for Uniden UBC125 scanner

2018-06-11 Thread Oliver Neukum
On Mo, 2018-06-11 at 12:39 +0200, Houston Yaroschoff wrote: > Uniden UBC125 radio scanner has USB interface which fails to work > with cdc_acm driver: > usb 1-1.5: new full-speed USB device number 4 using xhci_hcd > cdc_acm 1-1.5:1.0: Zero length descriptor references > cdc_acm: probe of

[PATCH] usb: cdc_acm: Add quirk for Uniden UBC125 scanner

2018-06-11 Thread Houston Yaroschoff
Uniden UBC125 radio scanner has USB interface which fails to work with cdc_acm driver: usb 1-1.5: new full-speed USB device number 4 using xhci_hcd cdc_acm 1-1.5:1.0: Zero length descriptor references cdc_acm: probe of 1-1.5:1.0 failed with error -22 Adding the NO_UNION_NORMAL quirk for the

Re: [PATCH] usb: xhci: increase CRS timeout value

2018-06-11 Thread Oliver Neukum
On Do, 2018-06-07 at 11:48 -0700, Ajay Gupta wrote: > Some controllers take almost 55ms to complete controller > restore state (CRS). > There is no timeout limit mentioned in xhci specification so > fix the issue by increasing the timeout limit to 55ms Hi, the chances that you saw the true worst

[PATCH] usb: storage: add error handling for kcalloc

2018-06-11 Thread Zhouyang Jia
When kcalloc fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling kcalloc. Signed-off-by: Zhouyang Jia --- drivers/usb/storage/alauda.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/storage/alauda.c

Re: [RFC PATCH v4 1/8] usb: pd: include kernel.h

2018-06-11 Thread Heikki Krogerus
On Mon, Jun 11, 2018 at 09:08:59AM +0200, Greg Kroah-Hartman wrote: > On Fri, Jun 08, 2018 at 02:29:34PM +0300, Heikki Krogerus wrote: > > Some of the macros use le16_to_cpu(). > > What macros? > > Is this causing build errors today? If so, why should it not be > included now? There are no

Re: [RFC PATCH v4 1/8] usb: pd: include kernel.h

2018-06-11 Thread Greg Kroah-Hartman
On Fri, Jun 08, 2018 at 02:29:34PM +0300, Heikki Krogerus wrote: > Some of the macros use le16_to_cpu(). What macros? Is this causing build errors today? If so, why should it not be included now? thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the

Re: [PATCH v3] storage: Widen bcdDevice range for SanDisk SDDR-31 quirk

2018-06-11 Thread Greg KH
On Sun, Jun 10, 2018 at 08:54:09PM +0200, Mark Knibbs wrote: > When I re-sent the patch with tabs I accidentally left the new maximum > bcdDevice at 0x00ff. Sorry! Hopefully this is finally OK. This should not be in the change log text, please remove it. > > > The SanDisk SDDR-31 needs the

Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB

2018-06-11 Thread Vivek Gautam
Hi, On 6/11/2018 12:06 PM, Julien Massot wrote: Hi, On 5/31/2018 4:17 PM, Manu Gautam wrote: Move from dwc3-of-simple to dwc3-qcom glue driver to support peripheral mode which requires qscratch wrapper programming on VBUS event. I would like to test usb otg as peripheral role, but that's

Re: [PATCH v2] arm64: dts: msm8996: Use dwc3-qcom glue driver for USB

2018-06-11 Thread Julien Massot
Hi, > On 5/31/2018 4:17 PM, Manu Gautam wrote: >> >> Move from dwc3-of-simple to dwc3-qcom glue driver to >> support peripheral mode which requires qscratch wrapper >> programming on VBUS event. I would like to test usb otg as peripheral role, but that's not clear for me which patches are