Re: [PATCH] usb: typec: tcpm: Correct the PPS out_volt calculation

2019-01-31 Thread Greg KH
On Thu, Jan 31, 2019 at 09:31:25AM +0200, Heikki Krogerus wrote: > On Wed, Jan 30, 2019 at 11:13:53AM +0800, Kyle Tso wrote: > > When Sink negotiates PPS, the voltage range of selected PPS APDO might > > not cover the previous voltage (out_volt). If the previous out_volt is > > lower than the new m

Re: [GIT PULL] USB fixes for v5.0-rc4

2019-01-31 Thread Greg Kroah-Hartman
On Thu, Jan 31, 2019 at 08:40:22AM +0200, Felipe Balbi wrote: > > Hi Greg, > > here's another pull request for this rc cycle. Only 5 commits this time > around. I'm guessing USB is almost code-complete > > Let me know if you want anything to be changed. > > cheers > ___ > < Code

Re: [PATCH] usb: typec: tcpm: Correct the PPS out_volt calculation

2019-01-31 Thread Heikki Krogerus
On Thu, Jan 31, 2019 at 09:01:00AM +0100, Greg KH wrote: > On Thu, Jan 31, 2019 at 09:31:25AM +0200, Heikki Krogerus wrote: > > On Wed, Jan 30, 2019 at 11:13:53AM +0800, Kyle Tso wrote: > > > When Sink negotiates PPS, the voltage range of selected PPS APDO might > > > not cover the previous voltage

Re: [GIT PULL] USB fixes for v5.0-rc4

2019-01-31 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: >> here's another pull request for this rc cycle. Only 5 commits this time >> around. I'm guessing USB is almost code-complete >> >> Let me know if you want anything to be changed. >> >> cheers >> ___ >> < Code Complete > >> --- >>

Re: [RFC PATCH] USB: PCI: set 32bit DMA mask for PCI based USB controllers

2019-01-31 Thread John Garry
On 30/01/2019 07:01, Hanjun Guo wrote: From: Hanjun Guo We met an issue that when we update the IORT table to revision D, and the kernel update to 4.19, the USB on D06 (ARM64 based server) will probe fail: [ 13.495751] CPU: 0 PID: 15 Comm: kworker/0:1 Not tainted 4.19.0-00115-gb2b5200 #5 [

Re: [PATCH v2 0/9] device connection: Add support for device graphs

2019-01-31 Thread Hans de Goede
Hi, On 30-01-19 17:02, Heikki Krogerus wrote: Hi, This is the second version of this series. On top the two code style improvements requested by Andy, I also renamed the connection identifiers used with the USB Type-C muxes for something that I felt are better, especially after we start using t

Re: [PATCH 1/8] platform/x86: intel_cht_int33fe: Remove connection for the alt mode mux

2019-01-31 Thread Hans de Goede
Hi, On 28-01-19 16:27, Heikki Krogerus wrote: Hi Hans, On Mon, Jan 28, 2019 at 11:44:29AM +0100, Hans de Goede wrote: Hi, On 28-01-19 10:45, Andy Shevchenko wrote: On Fri, Jan 25, 2019 at 3:17 PM Heikki Krogerus wrote: Driver for fusb302 does not support alternate modes, so the connection

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Jan-Marek Glogowski
Am 30.01.19 um 17:56 schrieb Jan-Marek Glogowski: > Am 30.01.19 um 15:58 schrieb Mathias Nyman: >> On 30.01.2019 14:38, Jan-Marek Glogowski wrote: >> >> The hub->event bits are set when roothub polling timer function gets data >> from >> hub_status_data(), writes the data to a status urb, and retu

[PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-01-31 Thread Pawel Laszczak
Patch moves switch responsible for decoding descriptor type outside snprintf. It's little improves code readability. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 111 +++-- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/drivers/u

[PATCH v3 0/6] Introduced new Cadence USBSS DRD Driver.

2019-01-31 Thread Pawel Laszczak
This patch set introduce new Cadence USBSS DRD driver to linux kernel. The Cadence USBSS DRD Driver s a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. The current driver has been validated with FPGA burned. We

[PATCH v3 1/6] dt-bindings: add binding for USBSS-DRD controller.

2019-01-31 Thread Pawel Laszczak
This patch aim at documenting USB related dt-bindings for the Cadence USBSS-DRD controller. Signed-off-by: Pawel Laszczak --- .../devicetree/bindings/usb/cdns-usb3.txt | 33 +++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/cdns-us

[PATCH v3 6/6] usb:cdns3 Fix for stuck packets in on-chip OUT buffer.

2019-01-31 Thread Pawel Laszczak
Controller for OUT endpoints has shared on-chip buffers for all incoming packets, including ep0out. It's FIFO buffer, so packets must be handle by DMA in correct order. If the first packet in the buffer will not be handled, then the following packets directed for other endpoints and functions will

[PATCH v3 3/6] usb:common Patch simplify usb_decode_set_clear_feature function.

2019-01-31 Thread Pawel Laszczak
Patch adds usb_decode_test_mode and usb_decode_device_feature functions, which allow to make more readable and simplify the usb_decode_set_clear_feature function. Signed-off-by: Pawel Laszczak --- drivers/usb/common/debug.c | 83 ++ 1 file changed, 40 insertio

[PATCH v3 2/6] usb:common Separated decoding functions from dwc3 driver.

2019-01-31 Thread Pawel Laszczak
Patch moves some decoding functions from driver/usb/dwc3/debug.h driver to driver/usb/common/debug.c file. These moved functions include: dwc3_decode_get_status dwc3_decode_set_clear_feature dwc3_decode_set_address dwc3_decode_get_set_descriptor dwc3_decode_get_configuration

Re: [PATCH v3 4/6] usb:common Simplify usb_decode_get_set_descriptor function.

2019-01-31 Thread Andy Shevchenko
On Thu, Jan 31, 2019 at 1:53 PM Pawel Laszczak wrote: > > Patch moves switch responsible for decoding descriptor type > outside snprintf. It's little improves code readability. > + char *s; const ? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 7/9] usb: typec: Find the ports by also matching against the device node

2019-01-31 Thread Heikki Krogerus
On Wed, Jan 30, 2019 at 06:51:56PM +0200, Andy Shevchenko wrote: > On Wed, Jan 30, 2019 at 6:03 PM Heikki Krogerus > wrote: > > > > When the connections are defined in firmware, struct > > device_connection will have the fwnode member pointing to > > the device node (struct fwnode_handle) of the r

Re: [PATCH v2 0/9] device connection: Add support for device graphs

2019-01-31 Thread Heikki Krogerus
On Thu, Jan 31, 2019 at 11:06:29AM +0100, Hans de Goede wrote: > Hi, > > On 30-01-19 17:02, Heikki Krogerus wrote: > > Hi, > > > > This is the second version of this series. On top the two code style > > improvements requested by Andy, I also renamed the connection > > identifiers used with the U

[PATCH] usb: dwc2: Fix EP TxFIFO number setting

2019-01-31 Thread Minas Harutyunyan
In case when some EP IN is frequently reused, i.e. enabled/disabled by function driver. It is required to clear TxFIFO number field in DIEPCTL register before setting new number. Otherwise there is probability to have same TxFIFO number for different EP's because of OR operator. Signed-off-by: Min

Re: usb: dwc2: usb data transmitted to incorrect usb endpoint

2019-01-31 Thread Minas Harutyunyan
Hi Maynard, On 1/31/2019 3:36 AM, Maynard Cabiente wrote: > Hi Minas, > > On Wed, Jan 30, 2019 at 9:02 AM Minas Harutyunyan > wrote: >> Root cause of data messing between IN EP's because all IN EP's use same >> TXFIFO. TxFIFO number 7. See DIEPCTL's, bits 22-25 txfnum, from debug logs: >> >> EP1

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Mathias Nyman
On 31.01.2019 12:42, Jan-Marek Glogowski wrote: Am 30.01.19 um 17:56 schrieb Jan-Marek Glogowski: Am 30.01.19 um 15:58 schrieb Mathias Nyman: On 30.01.2019 14:38, Jan-Marek Glogowski wrote: The hub->event bits are set when roothub polling timer function gets data from hub_status_data(), writes

[PATCH 0/2] wMaxPacketSize handling

2019-01-31 Thread Andrzej Pietrasiewicz
Dear All, While playing with FunctionFS I have noticed that high speed descriptors passed from userspace get overwritten by usb_ep_autoconfig() function. It happens for bulk endpoints, to be precise. At the time of this writing (5.0-rc4) there are 6 users of usb_ep_autoconfig(), who call it for d

[PATCH 2/2] usb: gadget: f_fs: preserve wMaxPacketSize across usb_ep_autoconfig() call

2019-01-31 Thread Andrzej Pietrasiewicz
usb_ep_autoconfig() treats the passed descriptor as if it were an fs descriptor. In particular, for bulk endpoints, it clips wMaxPacketSize to 64. This patch preserves the original value. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_fs.c | 11 +++ 1 file changed

[PATCH 1/2] usb: gadget: move non-super speed code out of usb_ep_autoconfig_ss()

2019-01-31 Thread Andrzej Pietrasiewicz
The moved code refers to non-super speed endpoints only. This patch also makes the comment stress the fact, that autoconfigured descriptor might need some adjustments. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/epautoconf.c | 41 +++-- 1 file changed,

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Jan-Marek Glogowski
Am 31.01.19 um 15:56 schrieb Mathias Nyman: > On 31.01.2019 12:42, Jan-Marek Glogowski wrote: >> Am 30.01.19 um 17:56 schrieb Jan-Marek Glogowski: >>> Am 30.01.19 um 15:58 schrieb Mathias Nyman: On 30.01.2019 14:38, Jan-Marek Glogowski wrote: The hub->event bits are set when rooth

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Alan Stern
This thread has been hard to follow. I'll try to answer some of your concerns below... On Thu, 31 Jan 2019, Jan-Marek Glogowski wrote: > Am 31.01.19 um 15:56 schrieb Mathias Nyman: > > On 31.01.2019 12:42, Jan-Marek Glogowski wrote: > >> Am 30.01.19 um 17:56 schrieb Jan-Marek Glogowski: > >>> Am

[PATCH] usb: xhci: pci: Enable Intel USB role mux on GLK platforms

2019-01-31 Thread Harry Pan
Like Apollo Lake, Gemini Lake support DRD in port 0, this patch enables the DRD support for GLK based on the EDS rev 2.2 vol #1 of section 3.8 of USB Controller. Signed-off-by: Harry Pan --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver

Re: [PATCH] usb: typec: tcpm: Export partner Source Capabilities

2019-01-31 Thread Guenter Roeck
On Thu, Jan 31, 2019 at 08:02:38AM +0100, Greg KH wrote: > On Thu, Jan 31, 2019 at 11:54:11AM +0800, Kyle Tso wrote: > > Provide a function to get the partner Source Capabilities. > > > > Signed-off-by: Kyle Tso > > --- > > drivers/usb/typec/tcpm/tcpm.c | 23 +++ > > include/

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Jan-Marek Glogowski
Am 31. Januar 2019 17:53:13 MEZ schrieb Alan Stern : >This thread has been hard to follow. I'll try to answer some of your >concerns below... > >On Thu, 31 Jan 2019, Jan-Marek Glogowski wrote: > >> Am 31.01.19 um 15:56 schrieb Mathias Nyman: >> > On 31.01.2019 12:42, Jan-Marek Glogowski wrote: >>

Re: [PATCH v3] usb: warm-reset ports on hub resume, if requested

2019-01-31 Thread Alan Stern
On Thu, 31 Jan 2019, Jan-Marek Glogowski wrote: > >Perhaps you didn't notice that at the end, hub_activate() calls > >kick_hub_wq(). That routine calls > >usb_autopm_get_interface_no_resume(), which will prevent the hub trim > >suspending until hub_event() calls usb_autopm_put_interface(). > >T

Re: usb: dwc2: usb data transmitted to incorrect usb endpoint

2019-01-31 Thread Maynard Cabiente
Hi Minas, On Thu, Jan 31, 2019 at 9:34 AM Minas Harutyunyan wrote: > Hi Maynard, > > On 1/31/2019 3:36 AM, Maynard Cabiente wrote: > > Hi Minas, > > > > On Wed, Jan 30, 2019 at 9:02 AM Minas Harutyunyan > > wrote: > >> Root cause of data messing between IN EP's because all IN EP's use same > >>

Re: [PATCH] usb: dwc2: Fix EP TxFIFO number setting

2019-01-31 Thread Maynard Cabiente
Hi, On Thu, Jan 31, 2019 at 9:28 AM Minas Harutyunyan wrote: > From: Minas Harutyunyan > > In case when some EP IN is frequently reused, i.e. enabled/disabled by > function driver. It is required to clear TxFIFO number field in DIEPCTL > register before setting new number. Otherwise there is pro

Fwd: MT65xx Preloader 0e8d:2000, Kernel 4.20.5.1

2019-01-31 Thread Carlos Salvador Pérez Salgado
-- Forwarded message - >From: Johan Hovold >Date: Thu, Jan 31, 2019 at 9:27 AM >Subject: Re: MT65xx Preloader 0e8d:2000, Kernel 4.20.5.1 >To: Carlos Salvador Pérez Salgado >Cc: Johan Hovold >On Thu, Jan 31, 2019 at 05:57:01AM -0600, Carlos Salvador Pérez Salgado wrote: >> Hello,

Re: [PATCH 1/4] usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete

2019-01-31 Thread Thinh Nguyen
Hi Felipe, Felipe Balbi wrote: > We must wait until End Transfer completes in order to clear > DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver. > > This patch is in preparation to fix a rare race condition that happens > upon Disconnect Interrupt. > > Signed-off-by: Felipe Balbi > -

Re: [RFC PATCH] USB: PCI: set 32bit DMA mask for PCI based USB controllers

2019-01-31 Thread Hanjun Guo
Hi John, On 2019/1/31 17:54, John Garry wrote: > On 30/01/2019 07:01, Hanjun Guo wrote: >> From: Hanjun Guo [...] >> >>  drivers/usb/core/hcd-pci.c | 4 >>  1 file changed, 4 insertions(+) >> >> diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c >> index 0343246..a9c33e6 100

Re: [PATCH 1/4] usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete

2019-01-31 Thread Felipe Balbi
Thinh Nguyen writes: > Hi Felipe, > > Felipe Balbi wrote: >> We must wait until End Transfer completes in order to clear >> DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver. >> >> This patch is in preparation to fix a rare race condition that happens >> upon Disconnect Interrupt. >>