RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Felipe Balbi
Hi, Robert Bielik writes: >> Indeed, that's also mandated by USB spec. Seems like we need to patch >> f_uac2.c. Can you check if setting the IN endpoint as implicit feedback >> data is enough? > > Just tried your proposed patches on 4.15.1 (with an RPi Zero) and with >

Goede dag

2018-02-12 Thread Santander Credit Finance®
Goede dag, Mijn naam is Ana Botin van Santander Credit Finance. Heb je een lening nodig Of geld om te investeren? dan is hier de juiste plaats om gefinancierd te worden. Onze interesse tarief is 3%. Vul de onderstaande gegevens in en stuur deze naar (i...@santandarco.uk). Voornaam: Achternaam:

USB regression for Android phone and sound card in 4.14

2018-02-12 Thread Nazar Mokrynskyi
Starting from 4.14 and continuing in 4.15 I observe 2 bugs that I think are related and didn't exist in 4.13. The first would be more difficult to reproduce: USB sound card Creative SB Omni Surround 5.1 after system boot only shows 2.0 stereo output option, while it also supports 5.1 and

[PATCH] usb: dwc2: Print error if unable to set DMA coherent mask

2018-02-12 Thread Stefan Wahren
We better print an error in case probing of dwc2 fails on setting the DMA coherent mask. Signed-off-by: Stefan Wahren --- drivers/usb/dwc2/platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/platform.c

[PATCH v1 1/1] usb: cdc_acm: prevent race at write to acm while system resumes

2018-02-12 Thread sathyanarayan . kuppuswamy
From: Dominik Bozek ACM driver may accept data to transmit while system is not fully resumed. In this case ACM driver buffers data and prepare URBs on usb anchor list. There is a little chance that two tasks put a char and initiate acm_tty_flush_chars(). In such a case,

Re: [PATCH usb-next v9 2/8] usb: add a flag to skip PHY initialization to struct usb_hcd

2018-02-12 Thread Alan Stern
On Mon, 12 Feb 2018, Martin Blumenstingl wrote: > Hi Alan, > > On Mon, Feb 12, 2018 at 4:15 PM, Alan Stern wrote: > > On Sun, 11 Feb 2018, Martin Blumenstingl wrote: > > > >> The USB HCD core driver parses the device-tree node for "phys" and > >> "usb-phys"

Re: [PATCH usb-next v9 2/8] usb: add a flag to skip PHY initialization to struct usb_hcd

2018-02-12 Thread Martin Blumenstingl
Hi Alan, On Mon, Feb 12, 2018 at 4:15 PM, Alan Stern wrote: > On Sun, 11 Feb 2018, Martin Blumenstingl wrote: > >> The USB HCD core driver parses the device-tree node for "phys" and >> "usb-phys" properties. It also manages the power state of these PHYs >>

Re: Bug 198731 "USB devices not seen with newest kernel"

2018-02-12 Thread The Real Bev
On 02/11/2018 09:50 PM, Greg KH wrote: On Fri, Feb 09, 2018 at 12:25:44PM -0800, The Real Bev wrote: On 02/09/2018 05:13 AM, Greg KH wrote: > On Thu, Feb 08, 2018 at 01:00:02PM -0800, The Real Bev wrote: > > I think I have found a bug in the linux kernel 4.9.79. The problem > > is in the

RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Robert Bielik
Hi Felipe, > Indeed, that's also mandated by USB spec. Seems like we need to patch > f_uac2.c. Can you check if setting the IN endpoint as implicit feedback > data is enough? Just tried your proposed patches on 4.15.1 (with an RPi Zero) and with g_audio, unfortunately there is no change. Device

Re: [PATCH usb-next v9 2/8] usb: add a flag to skip PHY initialization to struct usb_hcd

2018-02-12 Thread Alan Stern
On Sun, 11 Feb 2018, Martin Blumenstingl wrote: > The USB HCD core driver parses the device-tree node for "phys" and > "usb-phys" properties. It also manages the power state of these PHYs > automatically. > However, drivers may opt-out of this behavior by setting "phy" or > "usb_phy" in struct

Continuous USB resets on NXP i.MX 6ULL device

2018-02-12 Thread Stefan Agner
Hi Peter, Our Colibri iMX6ULL is using NXP i.MX6 ULL in USB host mode. With 4.15-rc3 and 4.16-rc1 I noticed that when a USB Hub is connected to the USB OTG controller in host mode, Linux continuously resets the USB device every two seconds: [0.927567] ehci_hcd: USB 2.0 'Enhanced' Host

Re: [BUG] SD card reader disappears after suspend

2018-02-12 Thread Mathias Nyman
On 10.02.2018 02:01, Samuel Sadok wrote: Thanks Mathias for looking into this. 2018-02-06 18:32 GMT+01:00 Mathias Nyman : Does reverting 37be6676 usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices help? Unfortunately not, the card reader is

[PATCH v2 RESEND] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume

2018-02-12 Thread Roger Quadros
In order for ULPI PHYs to work, dwc3_phy_setup() and dwc3_ulpi_init() must be doene before dwc3_core_get_phy(). commit 541768b08a40 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys") broke this. The other issue is that dwc3_core_get_phy() and dwc3_ulpi_init() should be

Re: VM Fails to Start When Passing Through PCIe Card

2018-02-12 Thread Mathias Nyman
On 10.02.2018 01:46, Blake lee wrote: I tested along with another person from the VFIO community that was having the same issue. Resolved in both cases. Thanks, patches sent forward. -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: Q: Does mass storage gadget use DMA ?

2018-02-12 Thread Oliver Neukum
Am Sonntag, den 11.02.2018, 22:17 +0200 schrieb Ran Shalit: > On Tue, Feb 6, 2018 at 8:55 AM, Felipe Balbi > wrote: > > > > > > Hi, > > > > Ran Shalit writes: > > > > > > Hello, > > > > > > I check code in: > > >

[PATCH 3/6] xhci: Fix NULL pointer in xhci debugfs

2018-02-12 Thread Mathias Nyman
From: Zhengjun Xing Commit dde634057da7 ("xhci: Fix use-after-free in xhci debugfs") causes a null pointer dereference while fixing xhci-debugfs usage of ring pointers that were freed during hibernate. The fix passed addresses to ring pointers instead, but forgot

[PATCH 6/6] xhci: fix xhci debugfs errors in xhci_stop

2018-02-12 Thread Mathias Nyman
From: Zhengjun Xing In function xhci_stop, xhci_debugfs_exit called before xhci_mem_cleanup. xhci_debugfs_exit removed the xhci debugfs root nodes, xhci_mem_cleanup called function xhci_free_virt_devices_depth_first which in turn called function

[PATCH 1/6] xhci: workaround for AMD Promontory disabled ports wakeup

2018-02-12 Thread Mathias Nyman
From: Joe Lee For AMD Promontory xHCI host, although you can disable USB ports in BIOS settings, those ports will be enabled anyway after you remove a device on that port and re-plug it in again. It's a known limitation of the chip. As a workaround we can clear the

[PATCH 2/6] xhci: Don't print a warning when setting link state for disabled ports

2018-02-12 Thread Mathias Nyman
When disabling a USB3 port the hub driver will set the port link state to U3 to prevent "ejected" or "safely removed" devices that are still physically connected from immediately re-enumerating. If the device was really unplugged, then error messages were printed as the hub tries to set the U3

[PATCH 5/6] xhci: xhci debugfs device nodes weren't removed after device plugged out

2018-02-12 Thread Mathias Nyman
From: Zhengjun Xing There is a bug after plugged out USB device, the device and its ep00 nodes are still kept, we need to remove the nodes in xhci_free_dev when USB device is plugged out. Fixes: 052f71e25a7e ("xhci: Fix xhci debugfs NULL pointer dereference in

[PATCH 4/6] xhci: Fix xhci debugfs devices node disappearance after hibernation

2018-02-12 Thread Mathias Nyman
From: Zhengjun Xing During system resume from hibernation, xhci host is reset, all the nodes in devices folder are removed in xhci_mem_cleanup function. Later nodes in /sys/kernel/debug/usb/xhci/* are created again in function xhci_run, but the nodes already exist,

[PATCH 0/6] xhci fixes for usb-linus

2018-02-12 Thread Mathias Nyman
Hi Greg This series contain xhci debugfs fixes by Zhengjun, AMD promontory workaround for keeping BIOS disabled ports disabled, and getting rid of a extra error message. Applies on 4.16-rc1 -Mathias Joe Lee (1): xhci: workaround for AMD Promontory disabled ports wakeup Mathias Nyman (1):

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-02-12 Thread Roger Quadros
Felipe, On 12/02/18 10:54, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> Adding/removing host/gadget controller before .pm_complete() >> causes a lock-up. Let's prevent any dual-role state change >> between .pm_prepare() and .pm_complete() to fix this. >> >>

RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Robert Bielik
> > Yes, but that isn't the issue AFAIU ? In the USB 2.0 standard related > > to synchronization > > (http://sdphca.ucsd.edu/lab_equip_manuals/usb_20.pdf chapter 5.12.4), > > an isochronous OUT ep with asynchronous synchronization is *required* > > (at least by Microsoft) to have a feedback IN ep,

RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Felipe Balbi
Hi, Robert Bielik writes: >> > It seems such a feedback endpoint is now required by the standard: >> > "The USB 2.0 specification states that if isochronous OUT data >> > endpoint uses the asynchronous synchronization, an isochronous >> > feedback endpoint is needed."

RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Robert Bielik
> > It seems such a feedback endpoint is now required by the standard: > > "The USB 2.0 specification states that if isochronous OUT data > > endpoint uses the asynchronous synchronization, an isochronous > > feedback endpoint is needed." > > We actually have both EP IN and EP OUT on the UAC2

RE: UAC2 gadget not recognized on Windows 10

2018-02-12 Thread Felipe Balbi
Hi, Robert Bielik writes: >> "Wait, never mind – I recognize that failing status code. usbaudio2.sys is >> complaining that you have an asynchronous data OUT endpoint but it can’t >> find a corresponding feedback endpoint." >> >> Unfortunately I have no idea what that

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-02-12 Thread Felipe Balbi
Hi, Roger Quadros writes: > Adding/removing host/gadget controller before .pm_complete() > causes a lock-up. Let's prevent any dual-role state change > between .pm_prepare() and .pm_complete() to fix this. > > Signed-off-by: Roger Quadros > --- >

Re: [PATCH 0/4] usb: gadget: fotg210-udc: Fixes and cleanup

2018-02-12 Thread Felipe Balbi
Hi, Christophe JAILLET writes: > This serie aims to fix 2 issues. (path 2 & 4) > > The 2nd patch fixes a memory leak. It uses devm_ function a simplify the > handling of the memory. > > The 4th patch fixes a potential invalid pointer dereference. > > The 2 other

UAC2 audio gadget queries

2018-02-12 Thread Robert Bielik
Hi all, I'm trying to get my head around how the UAC2 gadget stuff is supposed to work in relation to sample rate conversion etc. etc. From the docs (https://www.kernel.org/doc/htmldocs/gadget/structure.html), I surmise that: 1. USB controller driver 2. Gadget Driver 3. Upper Level (u_audio.c)

Re: [PATCH v2] usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume

2018-02-12 Thread Felipe Balbi
Roger Quadros writes: > In order for ULPI PHYs to work, dwc3_phy_setup() and dwc3_ulpi_init() > must be doene before dwc3_core_get_phy(). > > commit 541768b08a40 ("usb: dwc3: core: Call dwc3_core_get_phy() before > initializing phys") > broke this. > > The other issue is that