[PATCH v15 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Ajay Gupta
Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller over I2C interface. This UCSI I2C driver uses I2C bus driver interface for communicating with Type-C controller. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2 Fixed identation in drivers/usb/typec/ucsi/Kconfig Changes

[PATCH v15 1/2] i2c: buses: add i2c bus driver for NVIDIA GPU

2018-10-26 Thread Ajay Gupta
Latest NVIDIA GPU card has USB Type-C interface. There is a Type-C controller which can be accessed over I2C. This driver adds I2C bus driver to communicate with Type-C controller. I2C client driver will be part of USB Type-C UCSI driver. Signed-off-by: Ajay Gupta --- Changes from v1 -> v2

[PATCH v15 0/2] Add support for USB Type-C interface on latest NVIDIA GPU

2018-10-26 Thread Ajay Gupta
Hi Heikki and Wolfram, These two changes add support for USB Type-C interface on latest NVIDIA GPU card. The Type-C controller used is Cypress CCGx and is over I2C interface. I2C host controller has known limitation of sending STOP after every read. Since each read can be of 4 byte maximum

RE: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Ajay Gupta
Hi Peter and Andy, > Shouldn't you return -ETIMEDOUT if count == 0? > >>> Yes. Good catch. Does the below fix looks ok? > >>> > >>> do { > >>> status = ccg_write(uc, CCGX_RAB_INTR_REG, , > sizeof(data)); > >>> if (status < 0) > >>>

Re: [PATCH v2] HID: hiddev: fix potential Spectre v1

2018-10-26 Thread Jiri Kosina
On Fri, 19 Oct 2018, Breno Leitao wrote: > uref->usage_index can be indirectly controlled by userspace, hence leading > to a potential exploitation of the Spectre variant 1 vulnerability. > > This field is used as an array index by the hiddev_ioctl_usage() function, > when 'cmd' is either

[RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression

2018-10-26 Thread Hal Emmerich
>From 04fbf78e4e569bf872f1ffcb0a6f9b89569dc913 Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Thu, 19 Jul 2018 21:48:08 -0500 Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices  The bug would let the usb controller enter partial power down,  which was formally known as

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-26 Thread Alan Stern
On Fri, 26 Oct 2018, Mathias Nyman wrote: > On 25.10.2018 20:28, Alan Stern wrote: > > On Thu, 25 Oct 2018, Mathias Nyman wrote: > > > >> On 25.10.2018 12:52, Hao Wei Tee wrote: > >>> On 25/10/18 4:45 PM, Mathias Nyman wrote: > Reproducing the issue with a recent kernel with xhci traces

Re: EPROTO when USB 3 GbE adapters are under load

2018-10-26 Thread Mathias Nyman
On 25.10.2018 20:28, Alan Stern wrote: On Thu, 25 Oct 2018, Mathias Nyman wrote: On 25.10.2018 12:52, Hao Wei Tee wrote: On 25/10/18 4:45 PM, Mathias Nyman wrote: Reproducing the issue with a recent kernel with xhci traces enabled should show the reason for EPROTO error. Add xhci traces

Re: [PATCH v14 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Andy Shevchenko
On Thu, Oct 25, 2018 at 03:33:53PM -0700, aj...@nvidia.com wrote: > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller > over I2C interface. > > This UCSI I2C driver uses I2C bus driver interface for communicating > with Type-C controller. > + /* > + * Flush CCGx RESPONSE

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Heikki Krogerus
On Thu, Oct 25, 2018 at 09:55:47PM +, Ajay Gupta wrote: > Hi Heikki and Andy > [...] > > > > Shouldn't you return -ETIMEDOUT if count == 0? > > > Yes. Good catch. Does the below fix looks ok? > > > > > > do { > > > status = ccg_write(uc, CCGX_RAB_INTR_REG, , > > >

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Peter Rosin
On 2018-10-25 23:55, Ajay Gupta wrote: > Hi Heikki and Andy > [...] Shouldn't you return -ETIMEDOUT if count == 0? >>> Yes. Good catch. Does the below fix looks ok? >>> >>> do { >>> status = ccg_write(uc, CCGX_RAB_INTR_REG, , >>> sizeof(data)); >>> if