[PATCH 4/4] arm64: dts: exynos: Update DWC3 modules on Exynos5433 SoCs

2018-09-18 Thread Marek Szyprowski
Update DWC3 hardware modules to Exynos5433 specific variant: change compatible name and add all required clocks (both to the glue node and DWC3 core node). Signed-off-by: Marek Szyprowski --- arch/arm64/boot/dts/exynos/exynos5433.dtsi | 24 -- 1 file changed, 18

[PATCH 2/4] usb: dwc3: exynos: Rework clock handling and prepare for new variants

2018-09-18 Thread Marek Szyprowski
Add per-variant list of clocks and manage them all together in the single array. This is a preparation for adding new variants of Exynos SoCs. No functional changes for existing Exynos SoCs. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/dwc3-exynos.c | 128

[PATCH 1/4] usb: dwc3: exynos: Remove dead code

2018-09-18 Thread Marek Szyprowski
All supported Exynos variants provide respective generic PHY framework based drivers for controlling USB PHYs, so there is no point creating fake USB PHYs based on platform devices. While removing useless code, remove calls to runtime PM, which have no effect. Signed-off-by: Marek Szyprowski ---

[PATCH 0/4] DWC3: fix system suspend/resume issues on Exynos5433

2018-09-18 Thread Marek Szyprowski
Dear all, This patchset performs a cleanup of Exynos glue code for DWC3 driver and adds proper support for Exynos5433 specific variant of it (current implementation triggered external abort issue during suspend/resume cycle). Best regards Marek Szyprowski Samsung R Institute Poland Patch

[PATCH 3/4] usb: dwc3: exynos: Add support for Exynos5433 variant with all clocks

2018-09-18 Thread Marek Szyprowski
DWC3 variant found in Exynos5433 SoCs requires keeping all DRD30/UHOST30 clocks enabled all the time the driver does any access to DWC3 registers, otherwise external abort happens. So far DWC3 hardware module worked with samsung,exynos5250-dwusb3 compatible only by luck when built into kernel: all

[PATCH] usb: gadget: uvc: configfs: Sort frame intervals upon writing

2018-09-18 Thread Laurent Pinchart
From: Paul Elder There is an issue where the host is unable to tell the gadget what frame rate it wants if the dwFrameIntervals in the interface descriptors are not in ascending order. This means that when instantiating a uvc gadget via configfs the user must make sure the dwFrameIntervals are

Re: broken TRIM support for JMS578 in uas mode

2018-09-18 Thread Panagiotis Malakoudis
I have the same issue that was posted in https://marc.info/?l=linux-usb=153295104606185=2 Output of 0xb2 and 0xb0 pages is: sg_vpd --page=0xb2 /dev/sda Logical block provisioning VPD page (SBC): Unmap command supported (LBPU): 1 Write same (16) with unmap bit supported (LBWS): 0 Write same

[PATCH] usb: host: fotg2: Fix potential NULL dereference

2018-09-18 Thread Linus Walleij
There is code in the .remove() hook to handle the drvdata being NULL, for good reasons: it is never set, so it will always be NULL. As I moved code around, static checkers start complaining. Instead of this, make sure to always set it on successful probe so we can always dereference it on the

Re: [PATCH] usb: dwc2: Disable all EP's on disconnect

2018-09-18 Thread kbuild test robot
Hi Minas, I love your patch! Perhaps something to improve: [auto build test WARNING on balbi-usb/next] [also build test WARNING on v4.19-rc4 next-20180918] [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

Re: [PATCH 2/3] xhci: Avoid USB autosuspend when resuming USB2 ports.

2018-09-18 Thread Anshuman Gupta
On Mon, Sep 17, 2018 at 11:24:20AM +0300, Mathias Nyman wrote: > On 14.09.2018 16:00, Greg KH wrote: > > On Fri, Sep 14, 2018 at 03:33:30PM +0300, Mathias Nyman wrote: > > > From: Anshuman Gupta > > > > > > When USB bus host controller root hub resumes from autosuspend, > > > it immediately

[PATCH] usb: gadget: uvc: Remove uvc_set_trace_param() function

2018-09-18 Thread Laurent Pinchart
The function is never called, remove it. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/f_uvc.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index 0cc4a6220050..8c99392df593 100644 ---

[PATCH 2/3] usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

2018-09-18 Thread Laurent Pinchart
When USB requests for video data fail to be submitted, the driver signals a problem to the host by halting the video streaming endpoint. This is only valid in bulk mode, as isochronous transfers have no handshake phase and can't thus report a stall. The usb_ep_set_halt() call returns an error when

[PATCH 3/3] usb: gadget: uvc: Replace plain printk() with dev_*()

2018-09-18 Thread Laurent Pinchart
Adding device context to the kernel log messages make them more useful. Add new uvcg_* macros based on dev_*() that print both the gadget device name and the function name. While at it, remove a commented out printk statement and an unused printk-based macro. Signed-off-by: Laurent Pinchart ---

[PATCH 1/3] usb: gadget: uvc: Factor out video USB request queueing

2018-09-18 Thread Laurent Pinchart
USB requests for video data are queued from two different locations in the driver, with the same code block occurring twice. Factor it out to a function. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_video.c | 30 -- 1 file changed, 20

[PATCH 2/4] usb: gadget: uvc: configfs: Fix operation on big endian platforms

2018-09-18 Thread Laurent Pinchart
USB descriptors are stored in little endian, requiring the use of conversion macros. Those macros are incorrectly used for values stored in native endian structures within the driver. Operation on big endian platforms is thus broken. Fix it by removing the conversion macros where they're not

[PATCH 0/4] usb: gadget: uvc: Fix endianness and sign issues

2018-09-18 Thread Laurent Pinchart
Hello, This series addresses endianness and sign issues in the configfs support of the UVC gadget function driver. The first patch starts by fixing the endianness of various UVC descriptors to match the USB little endian order. The second patch then fixed the UVC gadget function driver to handle

[PATCH 1/4] usb: video: Fix endianness mismatches in descriptor structures

2018-09-18 Thread Laurent Pinchart
All UVC descriptors use little-endian format, update the data structures accordingly. Signed-off-by: Laurent Pinchart --- include/uapi/linux/usb/video.h | 304 - 1 file changed, 152 insertions(+), 152 deletions(-) diff --git

[PATCH 3/4] usb: gadget: uvc: configfs: Simplify attributes macros

2018-09-18 Thread Laurent Pinchart
Several macros used to define attributes and their access functions take multiple arguments to specify endianness and string conversion functions, based on the size of the attribute. This can be simplified by passing the number of bits explicitly, and constructing the name of the functions

[PATCH 4/4] usb: gadget: uvc: configfs: Use %u to print unsigned int values

2018-09-18 Thread Laurent Pinchart
The driver uses the %d format to print unsigned int values. The correct format is %u. Fix it. Signed-off-by: Laurent Pinchart --- drivers/usb/gadget/function/uvc_configfs.c | 32 +++--- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git

[PATCH] usb: dwc2: Disable all EP's on disconnect

2018-09-18 Thread Minas Harutyunyan
Disabling all EP's allow to reset EP's to initial state. On disconnect disable all EP's instead of just killing all requests. Because of some platform didn't catch disconnect event, same stuff added to dwc2_hsotg_core_init_disconnected() function when USB reset detected on the bus. In

Re: Possible race condition in f_mass_storage gadget during deinitialization. Kernel warning issued

2018-09-18 Thread Minas Harutyunyan
Hi Adrian, On 9/10/2018 11:54 AM, Adrian Ambrożewicz wrote: > Thanks for the patch. I was happy to blindly apply it on my sources and > check the result. Unfortunately it ended up with even worse crash than > before. > > I've noticed that uninitialized stack variable "flags" is passed > to