RE: [PATCH v2] USB: chipidea: Do not hang when CONFIG_USB_CHIPIDEA_ULPI is not selected

2018-06-25 Thread Peter Chen
> > Fixes: 03e6275ae381087bd8 ("usb: chipidea: Fix ULPI on imx51") > Suggested-by: Lucas Stach > Signed-off-by: Fabio Estevam > --- > Changes since v1: > - Only propagate the error when CONFIG_USB_CHIPIDEA_ULPI is unselected > > drivers/usb/chipidea/core.c | 11 +++ > 1 file

Re: [GIT PULL] usb: chipidea: fixes for v4.18-rc

2018-06-25 Thread Greg Kroah-Hartman
On Tue, Jun 26, 2018 at 02:26:02AM +, Peter Chen wrote: > The following changes since commit d5a4f93511b7000183c0d528739b824752139f79: > > usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered > (2018-06-25 21:43:35 +0800) > > are available in the git repository at: >

[GIT PULL] usb: chipidea: fixes for v4.18-rc

2018-06-25 Thread Peter Chen
The following changes since commit d5a4f93511b7000183c0d528739b824752139f79: usb: typec: tcpm: fix logbuffer index is wrong if _tcpm_log is re-entered (2018-06-25 21:43:35 +0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/

Proof Of Payment

2018-06-25 Thread kit
Proof Of Payment. View your payment funds. FBI Director Christopher A. Wray Director Since August 2, 2017 - Present __ This email has been scanned by the Symantec Email Security.cloud service.

Proof Of Payment

2018-06-25 Thread kit
Proof Of Payment. View your payment funds. FBI Director Christopher A. Wray Director Since August 2, 2017 - Present __ This email has been scanned by the Symantec Email Security.cloud service.

Re: usb/serial - pl2303 module - buffer overflow

2018-06-25 Thread Matthias Dieter Wallnöfer
Hi Greg, a big thank for your exhaustive explanation. Of course this scenario was more about testing than real-world experience since most serial protocols I am aware of use much shorter messages. What regards to the Prolific chip: I fully agree with you that it is a consumer IC which does not

Re: [PATCH 05/12] usb: usblp: use irqsave() in USB's complete callback

2018-06-25 Thread Pete Zaitcev
On Mon, 25 Jun 2018 00:08:38 +0200 Sebastian Andrzej Siewior wrote: > Use the _irqsave() variant of the locking primitives. > usblp->wcomplete = 1; > wake_up(>wwait); > - spin_unlock(>lock); > + spin_unlock_irqrestore(>lock, flags); Code is correct, addresses the stated

Re: [PATCH 07/12] usb: usbtest: use irqsave() in USB's complete callback

2018-06-25 Thread Alan Stern
On Mon, 25 Jun 2018, Sebastian Andrzej Siewior wrote: > The USB completion callback does not disable interrupts while acquiring > the lock. We want to remove the local_irq_disable() invocation from > __usb_hcd_giveback_urb() and therefore it is required for the callback > handler to disable the

Re: [PATCH 03/12] usb: core: use irqsave() in sg_complete() complete callback

2018-06-25 Thread Alan Stern
On Mon, 25 Jun 2018, Sebastian Andrzej Siewior wrote: > The USB completion callback does not disable interrupts while acquiring > the lock. We want to remove the local_irq_disable() invocation from > __usb_hcd_giveback_urb() and therefore it is required for the callback > handler to disable the

Re: [PATCH 04/12] usb: usbfs: use irqsave() in USB's complete callback

2018-06-25 Thread Alan Stern
On Mon, 25 Jun 2018, Sebastian Andrzej Siewior wrote: > The USB completion callback does not disable interrupts while acquiring > the lock. We want to remove the local_irq_disable() invocation from > __usb_hcd_giveback_urb() and therefore it is required for the callback > handler to disable the

Re: [PATCH 3/3] usb: typec: ucsi: Fix for incorrect status data issue

2018-06-25 Thread Greg Kroah-Hartman
On Mon, Jun 25, 2018 at 05:48:05PM +0300, Heikki Krogerus wrote: > On Mon, Jun 25, 2018 at 08:37:25PM +0800, Greg Kroah-Hartman wrote: > > On Thu, Jun 21, 2018 at 04:43:19PM +0300, Heikki Krogerus wrote: > > > According to UCSI Specification, Connector Change Event only > > > means a change in the

Re: [PATCH 3/3] usb: typec: ucsi: Fix for incorrect status data issue

2018-06-25 Thread Heikki Krogerus
On Mon, Jun 25, 2018 at 08:37:25PM +0800, Greg Kroah-Hartman wrote: > On Thu, Jun 21, 2018 at 04:43:19PM +0300, Heikki Krogerus wrote: > > According to UCSI Specification, Connector Change Event only > > means a change in the Connector Status and Operation Mode > > fields of the STATUS data

[PATCH v2] USB: chipidea: Do not hang when CONFIG_USB_CHIPIDEA_ULPI is not selected

2018-06-25 Thread Fabio Estevam
From: Fabio Estevam Since commit 03e6275ae381087bd8 ("usb: chipidea: Fix ULPI on imx51") the kernel hangs on a imx51-babbage board, when using the ULPI interface with the CONFIG_USB_CHIPIDEA_ULPI option unselected. Instead of hanging the kernel, let's warn the user that CONFIG_USB_CHIPIDEA_ULPI

Re: [PATCH] USB: chipidea: Do not hang when CONFIG_USB_CHIPIDEA_ULPI is not selected

2018-06-25 Thread Fabio Estevam
On Mon, Jun 25, 2018 at 11:06 AM, Fabio Estevam wrote: > From: Fabio Estevam > > Since commit 03e6275ae381087bd8 ("usb: chipidea: Fix ULPI on imx51") the > kernel hangs on a imx51-babbage board, when using the ULPI interface with > the CONFIG_USB_CHIPIDEA_ULPI option unselected. > > Instead of

[PATCH] USB: chipidea: Do not hang when CONFIG_USB_CHIPIDEA_ULPI is not selected

2018-06-25 Thread Fabio Estevam
From: Fabio Estevam Since commit 03e6275ae381087bd8 ("usb: chipidea: Fix ULPI on imx51") the kernel hangs on a imx51-babbage board, when using the ULPI interface with the CONFIG_USB_CHIPIDEA_ULPI option unselected. Instead of hanging the kernel, let's warn the user that CONFIG_USB_CHIPIDEA_ULPI

Re: usb/serial - pl2303 module - buffer overflow

2018-06-25 Thread Greg KH
On Sun, Jun 24, 2018 at 05:40:37PM +0200, Matthias Dieter Wallnöfer wrote: > Hi people, > > as I am working with a PL2303-based USB-to-serial converter I discovered > that the SW-based flow control was unsupported for all kernels till the > upcoming 4.18 release. Thanks to the patch by Florian

Re: [PATCH] HID: usbhid: use irqsave() in USB's complete callback

2018-06-25 Thread Jiri Kosina
On Tue, 19 Jun 2018, Sebastian Andrzej Siewior wrote: > The USB completion callback does not disable interrupts while acquiring > the ->lock. We want to remove the local_irq_disable() invocation from > __usb_hcd_giveback_urb() and therefore it is required for the callback > handler to disable the

Re: [GIT PULL] USB fixes for v4.18-rc1

2018-06-25 Thread Greg Kroah-Hartman
On Wed, Jun 20, 2018 at 02:14:57PM +0300, Felipe Balbi wrote: > > Hi Greg, > > here's the first set of fixes for current -rc cycle. Patches have been > soaking for a while and I've also tested on some of our platforms from > the lab. > > Let me know if you want anything to be changed. Pulled

Re: [PATCH 3/3] usb: typec: ucsi: Fix for incorrect status data issue

2018-06-25 Thread Greg Kroah-Hartman
On Thu, Jun 21, 2018 at 04:43:19PM +0300, Heikki Krogerus wrote: > According to UCSI Specification, Connector Change Event only > means a change in the Connector Status and Operation Mode > fields of the STATUS data structure. So any other change > should create another event. > > Unfortunately

[PATCH v5] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
Most of FTDI's devices have an EEPROM which records FTDI devices configuration setting (e.g. the VID, PID, I/O config...) and user data. For example, FT232R and FTX chips have 128-byte and 2048-byte internal EEPROM respectively. This patch adds support for FTDI EEPROM read/write via USB control

Re: [PATCH v4] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread kbuild test robot
Hi Loic, Thank you for the patch! Yet something to improve: [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.18-rc2 next-20180625] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH v4] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread kbuild test robot
Hi Loic, Thank you for the patch! Yet something to improve: [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.18-rc2 next-20180625] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: UDC ep0 desc or no desc

2018-06-25 Thread Benjamin Herrenschmidt
On Mon, 2018-06-25 at 13:28 +0300, Felipe Balbi wrote: > > > > That would be a pretty strange thing to do. I'd say it's not worth > > > worrying about until somebody makes that mistake. > > > > Well, things like usb_endpoint_maxp() seem not *completely* far fetched > > but yeah EP0 is usually

Re: USB Type-C hub detection is flaky

2018-06-25 Thread Timur Kristóf
On Mon, 2018-06-25 at 13:11 +0300, Heikki Krogerus wrote: > +Mika > > On Fri, Jun 22, 2018 at 10:12:10AM +0200, Timur Krist?f wrote: > > Hi, > > > > I have a Dell XPS 13 9370, which has just Type-C ports. Currently > > running kernel 4.17.2. I found that plugging in a powered USB hub > > into >

RE: [PATCH v7 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-25 Thread Adam Thomson
On 25 June 2018 09:09, Li Jun wrote: > This patch adds support of get typec and power delivery config from > firmware description. > > Reviewed-by: Heikki Krogerus > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun > --- > drivers/usb/typec/tcpm.c | 132

Re: UDC ep0 desc or no desc

2018-06-25 Thread Felipe Balbi
Hi, Benjamin Herrenschmidt writes: > On Sat, 2018-06-23 at 11:07 -0400, Alan Stern wrote: >> On Sat, 23 Jun 2018, Benjamin Herrenschmidt wrote: >> >> > Hi folks ! >> > >> > I noticed some UDC drivers setup a "desc" pointer for ep0.desc for the >> > driver, some don't. >> > >> > Is it

Re: USB Type-C hub detection is flaky

2018-06-25 Thread Heikki Krogerus
+Mika On Fri, Jun 22, 2018 at 10:12:10AM +0200, Timur Krist?f wrote: > Hi, > > I have a Dell XPS 13 9370, which has just Type-C ports. Currently > running kernel 4.17.2. I found that plugging in a powered USB hub into > the Type-C port does not work. > > Please let me know if this isn't the

[PATCH v4] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
Most of FTDI's devices have an EEPROM which records FTDI devices configuration setting (e.g. the VID, PID, I/O config...) and user data. For example, FT232R and FTX chips have 128-byte and 2048-byte internal EEPROM respectively. This patch adds support for FTDI EEPROM read/write via USB control

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-25 Thread Felipe Balbi
Hi, please don't top-post and break your emails at 80 columns liangshengjun writes: > Hi balbi, > > Thanks for reponse. Now I fixed this case without check STALL > status when clear-Halt request. > > BDW, I have meet other case: > > Run dwc3 for uvc function, the uvc video show

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-25 Thread liangshengjun
Hi balbi, Thanks for reponse. Now I fixed this case without check STALL status when clear-Halt request. BDW, I have meet other case: Run dwc3 for uvc function, the uvc video show video overlapping when windows 7 restart camera app. I debug the dwc3 drivers ,found : 1. when

Re: [PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Johan Hovold
On Mon, Jun 25, 2018 at 10:35:31AM +0200, Loic Poulain wrote: > Hi Andy, > > On 25 June 2018 at 09:36, Andy Shevchenko wrote: > > On Fri, Jun 22, 2018 at 5:22 PM, Loic Poulain > > wrote: > >> +#define EEPROM_SZ_FTX 2048 /* cf FTDI AN_201 */ > >> +#define EEPROM_SZ_FT232RL 128 /* cf FTDI

Re: [PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
Hi Andy, On 25 June 2018 at 09:36, Andy Shevchenko wrote: > On Fri, Jun 22, 2018 at 5:22 PM, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which records FTDI devices >> configuration setting (e.g. the VID, PID, I/O config...) and user >> data. > >> FT230R chip integrates a

[PATCH v7 13/14] staging: typec: tcpci: Only touch target bit when enable vconn

2018-06-25 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH v7 14/14] staging: typec: tcpci: move tcpci drivers out of staging

2018-06-25 Thread Li Jun
Move TCPCI(Typec port controller interface) driver and rt1711h driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 22

[PATCH v7 08/14] staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

2018-06-25 Thread Li Jun
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. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v7 10/14] staging: typec: tcpci: enable vbus detection

2018-06-25 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c

[PATCH v7 09/14] staging: typec: tcpci: register port before request irq

2018-06-25 Thread Li Jun
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. Reviewed-by: Heikki Krogerus Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 +-- 1

[PATCH v7 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-25 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 132 +++ 1 file changed, 110 insertions(+), 22

[PATCH v7 12/14] staging: typec: tcpci: keep the disconnected cc line open

2018-06-25 Thread Li Jun
While set polarity, we should keep the disconnected cc line to be open. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c

[PATCH v7 05/14] usb: typec: add API to get typec basic port power and data config

2018-06-25 Thread Li Jun
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 | 58 +++ include/linux/usb/typec.h | 3 +++ 2 files changed, 57 insertions(+), 4

[PATCH v7 11/14] typec: tcpm: add starting value for drp toggling

2018-06-25 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. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH v7 07/14] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-06-25 Thread Li Jun
Since we will use config settings via device properties, so remove the hard code tcpci_tcpc_config. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c

[PATCH v7 04/14] usb: typec: add fwnode to tcpc

2018-06-25 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 +++ drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files

[PATCH v7 03/14] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-06-25 Thread Li Jun
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. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun ---

[PATCH v7 02/14] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-06-25 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 v7 01/14] dt-bindings: connector: add properties for typec

2018-06-25 Thread Li Jun
Add bindings supported by current typec driver, so user can pass all those properties via dt. Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 44 +++ include/dt-bindings/usb/pd.h | 62

[PATCH v7 00/14] staging: typec: tcpci: move out of staging

2018-06-25 Thread Li Jun
This patch set attempts to move the tcpci drivers out of staging by fix some tcpci driver issues and define typec and power delivery device properties, the changes are verified on NXP PTN5110, which is a standard tcpci typec port controller device with power delivery support, tested power source

Re: [PATCH] usb: cast sizeof() to int when comparing with error code

2018-06-25 Thread Johan Hovold
On Mon, Jun 25, 2018 at 03:35:18PM +0800, Chengguang Xu wrote: > Negative error code will be larger than sizeof(). Good catch! I was gonna ask you to submit this as three separate patches to facilitate stable backports, but fortunately it appears none of these have any bad implications (besides

Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

2018-06-25 Thread Felipe Balbi
Hi, Alan Stern writes: >> that patch is not 100% correct. You can revert it in your tree. I added >> that because of a problem I found when running adb against macOS. >> >> It's actually okay to send Clear Halt at any time, but for some reason >> dwc3 was hanging when running adb against

Re: [PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Andy Shevchenko
On Fri, Jun 22, 2018 at 5:22 PM, Loic Poulain wrote: > Most of FTDI's devices have an EEPROM which records FTDI devices > configuration setting (e.g. the VID, PID, I/O config...) and user > data. > FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte > eeprom... This sounds unfinished.

[PATCH] usb: cast sizeof() to int when comparing with error code

2018-06-25 Thread Chengguang Xu
Negative error code will be larger than sizeof(). Signed-off-by: Chengguang Xu --- drivers/usb/serial/ir-usb.c | 2 +- drivers/usb/serial/quatech2.c | 2 +- drivers/usb/serial/ssu100.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/ir-usb.c