Re: [PATCH] usb: gadget: u_serial: process RX in workqueue instead of tasklet

2018-12-16 Thread Felipe Balbi
Hi, Michał Mirosław writes: > Switch RX processing from tasklet to (delayed) work queue. This allows > receiver more room to process incoming data and prevents flood of > "ttyGS0: RX not scheduled?" messages on HS receive on slow CPU. > > A side effect is 2.4MB/s zmodem transfer speed (up from 1

Re: [PATCH 6/6] dmaengine: sh: rcar-dmac: Use device_iommu_mapped()

2018-12-16 Thread Vinod Koul
On 11-12-18, 14:43, Joerg Roedel wrote: > From: Joerg Roedel > > Use Use device_iommu_mapped() to check if the device is > already mapped by an IOMMU. Acked-by: Vinod Koul -- ~Vinod

[PATCH] Prevent race condition between USB authorisation and USB discovery events

2018-12-16 Thread Andrew Worsley
A sysfs driven USB authorisation change can trigger a usb_set_configuration while a hub_event worker thread is running. This can result in a USB device being disabled just after it was configured and bringing down all the devices and impacting hardware and user processes that were established on to

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-16 Thread Vinod Koul
On 11-12-18, 14:43, Joerg Roedel wrote: > From: Joerg Roedel > > Some places in the kernel check the iommu_group pointer in > 'struct device' in order to find ot whether a device is ^^ Typo -- ~Vinod

[PATCH] usb: gadget: uvc: add uvcg_warn macro

2018-12-16 Thread Paul Elder
We only have uvcg_dbg, uvcg_info, and uvcg_err, so add uvcg_warn macro to print gadget device name and function name along with format. Signed-off-by: Paul Elder --- drivers/usb/gadget/function/uvc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/function/uvc.h b/drive

[PATCH v2 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2018-12-16 Thread Paul Elder
Since "usb: gadget: uvc: enqueue uvc_request_data in setup handler for control OUT requests" it is no longer necessary for userspace to call ioctl UVCIOC_SEND_RESPONSE in response to receiving a UVC_EVENT_SETUP from the uvc function driver for a control OUT request. This change means that for cont

[PATCH v2 1/6] usb: uvc: include videodev2.h in g_uvc.h

2018-12-16 Thread Paul Elder
V4L2_EVENT_PRIVATE_START is used in g_uvc.h but is defined in videodev2.h, which is not included and causes a compiler warning: linux/usb/g_uvc.h:15:28: error: ‘V4L2_EVENT_PRIVATE_START’ undeclared here (not in a function) #define UVC_EVENT_FIRST (V4L2_EVENT_PRIVATE_START + 0) Include videode

[PATCH v2 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2018-12-16 Thread Paul Elder
Currently, for uvc class-specific control IN and OUT requests, in the setup handler a UVC_EVENT_SETUP with the setup control is enqueued to userspace. In response to this, the uvc function driver expects userspace to call ioctl UVCIOC_SEND_RESPONSE containing uvc request data. In the case of contr

[PATCH v2 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2018-12-16 Thread Paul Elder
This patch series adds a mechanism to allow asynchronously validating the data stage of a control OUT request, and for stalling or suceeding the request accordingly. This mechanism is implemented for MUSB, and is used by UVC. At the same time, UVC packages the setup stage and data stage data togeth

[PATCH v2 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2018-12-16 Thread Paul Elder
We now have a mechanism to signal the UDC driver to reply to a control OUT request with STALL or ACK, and we have packaged the setup stage data and the data stage data of a control OUT request into a single UVC_EVENT_DATA for userspace to consume. The ioctl UVCIOC_SEND_RESPONSE in the case of a con

[PATCH v2 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-16 Thread Paul Elder
A usb gadget function driver may or may not want to delay the status stage of a control OUT request. An instance it might want to is to asynchronously validate the data of a class-specific request. A function driver that wants an explicit status stage should set the newly added explicit_status fla

[PATCH v2 5/6] usb: musb: gadget: implement optional explicit status stage

2018-12-16 Thread Paul Elder
Implement the mechanism for optional explicit status stage for the MUSB driver. This allows a function driver to specify what to reply for the status stage. The functionality for an implicit status stage is retained. Signed-off-by: Paul Elder v1 Reviewed-by: Laurent Pinchart v1 Acked-by: Bin Liu

Re: [PATCH] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.

2018-12-16 Thread Macpaul Lin
On Fri, 2018-12-14 at 12:07 +0100, Johan Hovold wrote: > On Fri, Dec 14, 2018 at 10:00:16AM +0800, Macpaul Lin wrote: > > On Thu, 2018-12-13 at 11:18 +0100, Johan Hovold wrote: > > > On Thu, Dec 13, 2018 at 11:13:54AM +0100, Oliver Neukum wrote: > > > > On Do, 2018-12-13 at 10:43 +0100, Johan Hovol

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi, > >On 12/12/18 12:22 PM, Felipe Balbi wrote: >> >> Hi >> >> Pawel Laszczak writes: > + cdns->phy = devm_phy_get(dev, "cdns3,usbphy"); > + if (IS_ERR(cdns->phy)) { > + ret = PTR_ERR(cdns->phy); > + if (ret == -ENOSYS || ret == -ENODEV) { Are you sure y

Re: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G)

2018-12-16 Thread Charles Yeh
>From b9fd71c64d4d0d939a7a27e08a74d81f960ff5ea Mon Sep 17 00:00:00 2001 From: Charles Yeh Date: Sat, 15 Dec 2018 07:10:17 +0800 Subject: [PATCH] Add Proliic new chip: PL2303TB & PL2303N(G) Add new PID to support PL2303TB Add mew PID to support PL2303(N)GC/GB/GS/GT/GL/GE Add new request to support

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-16 Thread Guenter Roeck
On 12/16/18 6:48 PM, Kyle Tso wrote: Current matching rules ensure that the voltage range of selected Source Capability is entirely within the range defined in one of the Sink Capabilities. This is reasonable but not practical because Sink may not support wide range of voltage when sinking power

[PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-16 Thread Kyle Tso
Current matching rules ensure that the voltage range of selected Source Capability is entirely within the range defined in one of the Sink Capabilities. This is reasonable but not practical because Sink may not support wide range of voltage when sinking power while Source could advertise its capabi

RE: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency

2018-12-16 Thread Zengtao (B)
Hi Sergei: >-Original Message- >From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] >Sent: Friday, December 14, 2018 7:18 PM >To: Zengtao (B) ; ba...@kernel.org >Cc: liangshengjun ; Greg Kroah-Hartman >; linux-usb@vger.kernel.org; >linux-ker...@vger.kernel.org >Subject: Re: [

RE: [PATCH] usb: dwc3: gadget: fix miss isoc issue introduced by IRQ latency

2018-12-16 Thread Zengtao (B)
Hi Thinh: >-Original Message- >From: Thinh Nguyen [mailto:thinh.ngu...@synopsys.com] >Sent: Saturday, December 15, 2018 5:43 AM >To: Felipe Balbi ; Zengtao (B) > >Cc: liangshengjun ; Greg Kroah-Hartman >; linux-usb@vger.kernel.org; >linux-ker...@vger.kernel.org; Thinh Nguyen > >Subject: Re

Re: getting around "Max number of devices this xHCI host supports is 32" limit

2018-12-16 Thread Marc MERLIN
Thanks for your reply, and thanks for bearing with me, I'm not actually that knowledgeable on how things work with multiple USB controllers at the same time. I have a few questions I've outlined. Question #1, if I have a random computer that outputs this: Bus 002 Device 001: ID 1d6b:0003 Linux Fo

[PATCH] usb: gadget: u_serial: process RX in workqueue instead of tasklet

2018-12-16 Thread Michał Mirosław
Switch RX processing from tasklet to (delayed) work queue. This allows receiver more room to process incoming data and prevents flood of "ttyGS0: RX not scheduled?" messages on HS receive on slow CPU. A side effect is 2.4MB/s zmodem transfer speed (up from 1.8MB/s) on my test board. Signed-off-by

Re: [PATCH] usb: gadget: udc: renesas_usb3: add support for r8a774c0

2018-12-16 Thread Simon Horman
On Thu, Dec 13, 2018 at 08:23:55PM +, Fabrizio Castro wrote: > RZ/G2E USB 3.0 implementation is like the one found on R-Car E3, > therefore add the same quirk. > > Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman

Re: [PATCH] usb: gadget: udc: renesas_usb3: Add bindings for r8a774c0

2018-12-16 Thread Simon Horman
On Thu, Dec 13, 2018 at 08:22:18PM +, Fabrizio Castro wrote: > Document RZ/G2E (R8A774C0) SoC bindings. > > Signed-off-by: Fabrizio Castro Reviewed-by: Simon Horman

Re: What is the modern recommendation for sata to usb drive disconnect ?

2018-12-16 Thread borissh1983
Thank you . On Sunday, 16 December 2018 15:28:08 IST Greg KH wrote: > On Sun, Dec 16, 2018 at 01:09:48PM +0200, borissh1...@gmail.com wrote: > > Hi, > > > > I got to a slight confusion about what is the correct way to safely > > disconnect hdd sata over usb adapter with external power unit from

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-16 Thread Hans de Goede
Hi, On 16-12-18 18:36, Stephan Gerhold wrote: On Mon, Dec 03, 2018 at 11:50:53AM +0100, Hans de Goede wrote: Hi, Somewhat off topic, but: To be exact my device does not have them in the (original) ACPI table either. At the moment I override the ACPI DSDT table because there are some things I

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-16 Thread Stephan Gerhold
On Mon, Dec 03, 2018 at 11:50:53AM +0100, Hans de Goede wrote: > Hi, > > > Somewhat off topic, but: > > > > To be exact my device does not have them in the (original) ACPI table > > either. At the moment I override the ACPI DSDT table because there are > > some things I haven't found other workar

Re: usb: thoughts of adding more support for FT232H

2018-12-16 Thread Song Qiang
On 2018/12/13 下午9:23, Johan Hovold wrote: Hi Song, Sorry about the late reply. On Thu, Dec 06, 2018 at 02:02:21PM +0800, Song Qiang wrote: On 12/5/18 11:17 PM, Anatolij Gustschin wrote: Hi, On Wed, 5 Dec 2018 22:10:40 +0800 Song Qiang songqiang1304...@gmail.com wrote: ... I've been devel

RE: [RFC PATCH v2 08/15] usb:cdns3: Implements device operations part of the API

2018-12-16 Thread Pawel Laszczak
Hi > >On 14/12/18 4:56 PM, Felipe Balbi wrote: >> Hi, >> >> Sekhar Nori writes: All this should be part of comments in code along with information about controller versions which suffer from the errata. Is there a version of controller available which

Re: What is the modern recommendation for sata to usb drive disconnect ?

2018-12-16 Thread Greg KH
On Sun, Dec 16, 2018 at 01:09:48PM +0200, borissh1...@gmail.com wrote: > Hi, > > I got to a slight confusion about what is the correct way to safely > disconnect > hdd sata over usb adapter with external power unit from laptop running Linux > (4.18). > > my current action list was : > > 1.

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-16 Thread Pawel Laszczak
Hi Peter >On Mon, Dec 10, 2018 at 8:55 PM Pawel Laszczak wrote: >> >> This patch introduce new Cadence USBSS DRD driver >> to linux kernel. >> >> The Cadence USBSS DRD Driver is a highly >> configurable IP Core which can be >> instantiated as Dual-Role Device (DRD), >> Peripheral Only and Host On

What is the modern recommendation for sata to usb drive disconnect ?

2018-12-16 Thread borissh1983
Hi, I got to a slight confusion about what is the correct way to safely disconnect hdd sata over usb adapter with external power unit from laptop running Linux (4.18). my current action list was : 1. unmount everything 2. sync 3. hdpram -S 30 /dev/sdX (I'm not sure if does anything honestl