RE: usbip issue in stub_shutdown_connection while stub_complete triggers

2017-05-10 Thread fx IWATA NOBUO
Hello, I guess value of priv->urb might be NULL. But I'd like to confirm whether the NULL pointer is sdev or udev. (priv must not be NULL). In the code http://elixir.free-electrons.com/linux/latest/source/drivers/usb/usbip/stub_main.c#L250, could you find message L.255 or L.259 in your message

Re: usb: dwc2: NMI watchdog: BUG: soft lockup - CPU#0 stuck for 146s

2017-05-10 Thread Doug Anderson
Hi, On Wed, May 10, 2017 at 9:31 AM, Johan Hovold wrote: > On Mon, May 08, 2017 at 10:22:08PM +0200, Stefan Wahren wrote: >> >> > Stefan Wahren hat am 25. April 2017 um 20:11 >> > geschrieben: >> > >> > >> > > Stefan Wahren hat

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-10 Thread Joe Perches
On Wed, 2017-05-10 at 12:07 -0500, Bin Liu wrote: > On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: > > We have one register for each EP to set the maximum packet size for both > > TX and RX. > > If for example an RX programming would happen before the previous TX > > transfer

Re: [PATCH v2] usb: musb: musb_cppi41: Update an error message

2017-05-10 Thread Bin Liu
On Fri, May 05, 2017 at 07:52:33AM -0500, Alexandre Bailon wrote: > If dma_request_slave_channel() failed to return a channel, > then the driver will print an error and request to defer probe, > regardless of the cause of the failure. > Only defer if the DMA is not ready yet and print an error to

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-05-10 Thread Thinh Nguyen
Hi Felipe, On 4/21/2017 10:26 AM, John Youn wrote: > On 04/18/2017 05:47 AM, Felipe Balbi wrote: >> >> Hi, >> >> Thinh Nguyen writes: (Thinh, for whatever I didn't receive your email via the list, replying to myself) >>> >>> Could it be because of the

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-10 Thread Bin Liu
Hi, On Wed, May 10, 2017 at 11:42:27AM +0300, Peter Ujfalusi wrote: > We have one register for each EP to set the maximum packet size for both > TX and RX. > If for example an RX programming would happen before the previous TX > transfer finishes we would reset the TX packet side. > > To fix

Re: [PATCH v2 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > Add missing sanity check on the non-SuperSpeed hub-descriptor length in > order to avoid parsing and leaking two bytes of uninitialised slab data > through sysfs removable-attributes (or a compound-device debug > statement). > > Note that we only make

Re: [PATCH v2 1/6] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > Flag the first and only port as removable while also leaving the > remaining bits (including the reserved bit zero) unset in accordance > with the specifications: > > "Within a byte, if no port exists for a given location, the bit > field

Re: [PATCH v2 00/10] usb: musb: tusb6010_omap: Convert to DMAengine

2017-05-10 Thread Tony Lindgren
* Peter Ujfalusi [170510 01:45]: > The device would not boot to prompt most of the time before patch 5 (packet > size > reset fix). > With that patch in, the device would boot up fine most of the cases, but will > fail pretty fast with my stress test [1]. > After the first

Re: usb: dwc2: NMI watchdog: BUG: soft lockup - CPU#0 stuck for 146s

2017-05-10 Thread Johan Hovold
On Mon, May 08, 2017 at 10:22:08PM +0200, Stefan Wahren wrote: > > > Stefan Wahren hat am 25. April 2017 um 20:11 > > geschrieben: > > > > > > > Stefan Wahren hat am 22. April 2017 um 22:50 > > > geschrieben: > > > > > > > > > Hi, > > > > >

Re: [PATCH v2 09/10] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines

2017-05-10 Thread Tony Lindgren
* Peter Ujfalusi [170510 01:46]: > The external request lines are used by tusb6010 on OMAP24xx platforms. > Update the map so the driver can use dmaengine API to request the DMA > channel. At the same time add temporary map containing only the external > DMA request numbers

Re: [PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-10 Thread Tony Lindgren
* Peter Ujfalusi [170510 01:45]: > We have one register for each EP to set the maximum packet size for both > TX and RX. > If for example an RX programming would happen before the previous TX > transfer finishes we would reset the TX packet side. > > To fix this issue,

Re: [PATCH v2 01/10] dmaengine: omap-dma: port_window support correction for both direction

2017-05-10 Thread Tony Lindgren
* Peter Ujfalusi [170510 01:45]: > When the port_window support was verified it was done on setup where only > the MEM_TO_DEV direction was enabled. This got un-noticed and thus only > this direction worked. > > Now that I have managed to get a setup to verify both

[PATCH v2 2/6] USB: usbip: fix nonconforming hub descriptor

2017-05-10 Thread Johan Hovold
Fix up the root-hub descriptor to accommodate the variable-length DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as removable (and leaving the reserved bit zero unset). Also add a build-time constraint on VHCI_HC_PORTS which must never be greater than USB_MAXCHILDREN (but

[PATCH v2 0/6] USB: fix hub-descriptor handling

2017-05-10 Thread Johan Hovold
This series fixes some issues with how we handle hub descriptors, including a couple of small slab info leaks that could be triggered by a malicious hub. Note that the usbip fix has been compile tested only. Johan Changes in v2 - mark the single dummy_hcd port as removable (patch 1) - add

[PATCH v2 5/6] USB: hub: fix SS max number of ports

2017-05-10 Thread Johan Hovold
Add define for the maximum number of ports on a SuperSpeed hub as per USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub descriptor. This specifically avoids benign attempts to update the DeviceRemovable mask for non-existing ports (should we get that far). Fixes: dbe79bbe9dcb

[PATCH v2 3/6] USB: hub: fix SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
A SuperSpeed hub descriptor does not have any variable-length fields so bail out when reading a short descriptor. This avoids parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes. Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes") Cc: stable

[PATCH v2 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
Add missing sanity check on the non-SuperSpeed hub-descriptor length in order to avoid parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes (or a compound-device debug statement). Note that we only make sure that the DeviceRemovable field is always present

[PATCH v2 1/6] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

2017-05-10 Thread Johan Hovold
Flag the first and only port as removable while also leaving the remaining bits (including the reserved bit zero) unset in accordance with the specifications: "Within a byte, if no port exists for a given location, the bit field representing the port characteristics shall be 0."

[PATCH v2 6/6] USB: host: xhci: use max-port define

2017-05-10 Thread Johan Hovold
Use the new define for the maximum number of SuperSpeed ports instead of a constant when allocating xHCI root hubs. Signed-off-by: Johan Hovold --- drivers/usb/host/xhci-mem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
On Wed, May 10, 2017 at 11:11:37AM -0400, Alan Stern wrote: > On Wed, 10 May 2017, Johan Hovold wrote: > > > On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote: > > > On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote: > > > > On Wed, 10 May 2017, Johan Hovold wrote: > > > > >

Re: [PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote: > > On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote: > > > On Wed, 10 May 2017, Johan Hovold wrote: > > > > > /* USB 2.0 spec Section 11.24.4.5 */ > > > > -static int

Re: [PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
On Wed, May 10, 2017 at 04:31:19PM +0200, Johan Hovold wrote: > On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote: > > On Wed, 10 May 2017, Johan Hovold wrote: > > > /* USB 2.0 spec Section 11.24.4.5 */ > > > -static int get_hub_descriptor(struct usb_device *hdev, void *data) > > >

Re: [PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
On Wed, May 10, 2017 at 10:12:56AM -0400, Alan Stern wrote: > On Wed, 10 May 2017, Johan Hovold wrote: > > > Add missing sanity check on the non-SuperSpeed hub-descriptor length in > > order to avoid parsing and leaking two bytes of uninitialised slab data > > through sysfs removable-attributes

Re: [PATCH 3/6] USB: hub: fix SS hub-descriptor handling

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > On Wed, May 10, 2017 at 10:04:32AM -0400, Alan Stern wrote: > > On Wed, 10 May 2017, Johan Hovold wrote: > > > > > A SuperSpeed hub descriptor does not have any variable-length fields so > > > bail out when reading a short descriptor. > > > > You mean:

Re: [PATCH 1/6] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

2017-05-10 Thread Johan Hovold
On Wed, May 10, 2017 at 10:00:35AM -0400, Alan Stern wrote: > On Wed, 10 May 2017, Johan Hovold wrote: > > > Only flag the first and only port as non-removable in accordance with > > the specifications, while also leaving the reserved bit zero unset. > > > > "Within a byte, if no port exists

Re: [PATCH 5/6] USB: hub: fix SS max number of ports

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > Add define for the maximum number of ports on a SuperSpeed hub as per > USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub > descriptor. > > This specifically avoids benign attempts to update the DeviceRemovable > mask for non-existing

Re: [PATCH 3/6] USB: hub: fix SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
On Wed, May 10, 2017 at 10:04:32AM -0400, Alan Stern wrote: > On Wed, 10 May 2017, Johan Hovold wrote: > > > A SuperSpeed hub descriptor does not have any variable-length fields so > > bail out when reading a short descriptor. > > You mean: bail out when reading a descriptor that is not exactly

Re: [PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > Add missing sanity check on the non-SuperSpeed hub-descriptor length in > order to avoid parsing and leaking two bytes of uninitialised slab data > through sysfs removable-attributes (or a compound-device debug > statement). > > Note that we only make

Re: [PATCH 3/6] USB: hub: fix SS hub-descriptor handling

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > A SuperSpeed hub descriptor does not have any variable-length fields so > bail out when reading a short descriptor. You mean: bail out when reading a descriptor that is not exactly the right length. The existing code already bails out when it reads a

Re: [PATCH 1/6] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

2017-05-10 Thread Alan Stern
On Wed, 10 May 2017, Johan Hovold wrote: > Only flag the first and only port as non-removable in accordance with > the specifications, while also leaving the reserved bit zero unset. > > "Within a byte, if no port exists for a given location, the bit > field representing the port

[RESEND PATCH v4 2/5] usb: gadget: udc: make debug prints compatible with both pci and platform devices

2017-05-10 Thread Raviteja Garimella
This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: Raviteja Garimella ---

[RESEND PATCH v4 0/5] Platform driver support for 'amd5536udc' driver

2017-05-10 Thread Raviteja Garimella
Resending PATCH v4 since one of the patches is missing signature. Changes in PATCH v4: === -- Rebased with Balbi's git repo testing/next branch. -- Removed a patch that replaces pci_pool calls with dma_pool since the change is already pushed by other submitter. Resending

[RESEND PATCH v4 3/5] usb: gadget: udc: Provide correct arguments for 'dma_pool_create'

2017-05-10 Thread Raviteja Garimella
Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/snps_udc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[RESEND PATCH v4 5/5] usb: gadget: udc: Add Synopsys UDC Platform driver

2017-05-10 Thread Raviteja Garimella
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New

[RESEND PATCH v4 4/5] dt-bindings: usb: DT bindings documentation for Broadcom IPROC USB Device controller.

2017-05-10 Thread Raviteja Garimella
The device node is used for UDCs integrated into Broadcom's iProc family of SoCs'. The UDC is based on Synopsys Designware Cores AHB Subsystem USB Device Controller IP. Signed-off-by: Raviteja Garimella --- Documentation/devicetree/bindings/usb/iproc-udc.txt |

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2017-05-10 Thread Mathias Nyman
On 09.05.2017 16:50, Maël Lavault wrote: On Tue, 2017-05-09 at 11:34 +0300, Felipe Balbi wrote: Hi, Maël Lavault writes: Le 28 avr. 2017 15:57, "Maël Lavault"

usbip issue in stub_shutdown_connection while stub_complete triggers

2017-05-10 Thread Michael Grzeschik
Hi Nuobo, I am currently trying to resolve an issue regarding a similar problem to the one that your patch is solving: usbip: safe completion against usb_kill_urb() In some cases, when we still have urbs pending to complete and meanwhile the stack calls stub_shutdown_connection, we run into

[PATCH 4/6] USB: hub: fix non-SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
Add missing sanity check on the non-SuperSpeed hub-descriptor length in order to avoid parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes (or a compound-device debug statement). Note that we only make sure that the DeviceRemovable field is always present

[PATCH 5/6] USB: hub: fix SS max number of ports

2017-05-10 Thread Johan Hovold
Add define for the maximum number of ports on a SuperSpeed hub as per USB 3.1 spec Table 10-5, and use it when verifying the retrieved hub descriptor. This specifically avoids benign attempts to update the DeviceRemovable mask for non-existing ports (should we get that far). Fixes: dbe79bbe9dcb

[PATCH v4 3/5] usb: gadget: udc: Provide correct arguments for 'dma_pool_create'

2017-05-10 Thread Raviteja Garimella
Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/snps_udc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 2/6] USB: usbip: fix nonconforming hub descriptor

2017-05-10 Thread Johan Hovold
Fix up the root-hub descriptor to accommodate the variable-length DeviceRemovable and PortPwrCtrlMask fields, while marking all ports as removable (and leaving the reserved bit zero unset). Also add a build-time constraint on VHCI_HC_PORTS which must never be greater than USB_MAXCHILDREN (but

[PATCH 3/6] USB: hub: fix SS hub-descriptor handling

2017-05-10 Thread Johan Hovold
A SuperSpeed hub descriptor does not have any variable-length fields so bail out when reading a short descriptor. This avoids parsing and leaking two bytes of uninitialised slab data through sysfs removable-attributes. Fixes: dbe79bbe9dcb ("USB 3.0 Hub Changes") Cc: stable

[PATCH 6/6] USB: host: xhci: use max-port define

2017-05-10 Thread Johan Hovold
Use the new define for the maximum number of SuperSpeed ports instead of a constant when allocating xHCI root hubs. Signed-off-by: Johan Hovold --- drivers/usb/host/xhci-mem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 1/6] USB: gadget: dummy_hcd: fix hub-descriptor removable fields

2017-05-10 Thread Johan Hovold
Only flag the first and only port as non-removable in accordance with the specifications, while also leaving the reserved bit zero unset. "Within a byte, if no port exists for a given location, the bit field representing the port characteristics shall be 0." Also add a comment

[PATCH 0/6] USB: fix hub-descriptor handling

2017-05-10 Thread Johan Hovold
This series fixes some issues with how we handle hub descriptors, including a couple of small slab info leaks that could be triggered by a malicious hub. Note that the usbip fix has been compile tested only. Johan Johan Hovold (6): USB: gadget: dummy_hcd: fix hub-descriptor removable fields

[PATCH v4 5/5] usb: gadget: udc: Add Synopsys UDC Platform driver

2017-05-10 Thread Raviteja Garimella
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose where the platform driver registration is done based on OF node. Currently, UDC integrated into Broadcom's iProc SoCs (Northstar2 and Cygnus) work with this driver. New

[PATCH v4 4/5] dt-bindings: usb: DT bindings documentation for Broadcom IPROC USB Device controller.

2017-05-10 Thread Raviteja Garimella
The device node is used for UDCs integrated into Broadcom's iProc family of SoCs'. The UDC is based on Synopsys Designware Cores AHB Subsystem USB Device Controller IP. Signed-off-by: Raviteja Garimella --- Documentation/devicetree/bindings/usb/iproc-udc.txt |

[PATCH v4 2/5] usb: gadget: udc: make debug prints compatible with both pci and platform devices

2017-05-10 Thread Raviteja Garimella
This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: Raviteja Garimella ---

[PATCH v4 0/5] Platform driver support for 'amd5536udc' driver

2017-05-10 Thread Raviteja Garimella
Changes in PATCH v4: === -- Rebased with Balbi's git repo testing/next branch. -- Removed a patch that replaces pci_pool calls with dma_pool since the change is already pushed by other submitter. Resending PATCH v3 after rebasing with testing/next branch in Felipe Balbi's git

[PATCH v3 2/4] usb: dwc2: Define Active Clock Gating support bit in GHWCFG4

2017-05-10 Thread Razmik Karapetyan
The previously reserved 12th bit in GHWCFG4 now indicates that the controller supports the Dynamic Power Reduction (Active Clock Gating) during no traffic scenarios such as L0, idle, resume and suspend states. Signed-off-by: Razmik Karapetyan --- drivers/usb/dwc2/hw.h | 1 +

[PATCH v3 4/4] usb: dwc2: Backup and restore PCGCCTL1 register

2017-05-10 Thread Razmik Karapetyan
Backup PCGCCTL1 register when entering hibernation mode and restore it after exiting from hibernation, to keep active ACG feature. Signed-off-by: Razmik Karapetyan --- drivers/usb/dwc2/core.c | 2 ++ drivers/usb/dwc2/core.h | 1 + 2 files changed, 3 insertions(+) diff

[PATCH v3 1/4] usb: dwc2: Define PCGCCTL1 register in hw.h

2017-05-10 Thread Razmik Karapetyan
PCGCCTL1 (Power and Clock Control) register will be used for controlling the core`s active clock gating feature. Signed-off-by: Razmik Karapetyan --- drivers/usb/dwc2/hw.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc2/hw.h b/drivers/usb/dwc2/hw.h

[PATCH v3 3/4] usb: dwc2: Add dwc2_enable_acg function

2017-05-10 Thread Razmik Karapetyan
Added function for supporting Active Clock Gating functionality. This function checks GHWCFG4 register and if ACG supported, it sets GATEEN bit in PCGCCTL1 register and enables ACG. According to ACG functional specification, enabling of ACG feature in host mode done in host initialization, before

[PATCH v3 0/4] ACG support for dwc2 driver

2017-05-10 Thread Razmik Karapetyan
In short this feature specifies, that controller supports Dynamic Power Reduction during no traffic scenarios. Changes in v3: -added commit for backup and restore of ACG support register Razmik Karapetyan (4): usb: dwc2: Define PCGCCTL1 register in hw.h usb: dwc2: Define Active Clock

Re: [PATCH v5 1/9] phy: phy-mt65xx-usb3: improve RX detection stable time

2017-05-10 Thread Matthias Brugger
I took DTS parts for v4.12-next. Sorry for the late response. Matthias On 06/04/17 12:28, Kishon Vijay Abraham I wrote: On Friday 31 March 2017 01:05 PM, Chunfeng Yun wrote: The default value of RX detection stable time is 10us, and this margin is too big for some critical cases which cause

DWC2 USB Host Mode Lockup 4.11

2017-05-10 Thread Tim Sander
Hi I am currently seeing a error with the designware driver on Intel/Altera ARM Cortex A9 Cyclone SOC V Hardware. The USB PHY is a TUSB1210 without a hw reset line connected. The error only occurs on plugging in of the device in host mode. Once the USB device is enumerated i have not seen any

[PATCH v2 10/10] usb: musb: tusb6010_omap: Convert to DMAengine API

2017-05-10 Thread Peter Ujfalusi
With the port_window support in DMAengine and the sDMA driver we can convert the driver to DMAengine. Signed-off-by: Peter Ujfalusi --- drivers/usb/musb/tusb6010_omap.c | 201 --- 1 file changed, 80 insertions(+), 121 deletions(-) diff

[PATCH v2 00/10] usb: musb: tusb6010_omap: Convert to DMAengine

2017-05-10 Thread Peter Ujfalusi
-20170510 with g_ncm module since with this we can use the quirk to avoid skb_reserve and get properly aligned buffers for DMA. The n810 is using nfsroot. The device would not boot to prompt most of the time before patch 5 (packet size reset fix). With that patch in, the device would boot up fine most

[PATCH v2 03/10] usb: musb: tusb6010: Add MUSB_G_NO_SKB_RESERVE to quirks

2017-05-10 Thread Peter Ujfalusi
When using the g_ncm for networking this flag will make sure that the buffer is alligned to 32bit so the DMA can be used to offload the data movement. Signed-off-by: Peter Ujfalusi --- drivers/usb/musb/tusb6010.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v2 05/10] usb: musb: tusb6010_omap: Do not reset the other direction's packet size

2017-05-10 Thread Peter Ujfalusi
We have one register for each EP to set the maximum packet size for both TX and RX. If for example an RX programming would happen before the previous TX transfer finishes we would reset the TX packet side. To fix this issue, only modify the TX or RX part of the register. Signed-off-by: Peter

[PATCH v2 02/10] usb: musb: Add quirk to avoid skb reserve in gadget mode

2017-05-10 Thread Peter Ujfalusi
For tusb6010 the DMA functionality only possible if the buffer is 32bit aligned (SYNC access to FIFO) since with ASYNC access the TX/RX offset registers will corrupt eventually. The MUSB_G_NO_SKB_RESERVE will set the quirk_avoids_skb_reserve flag in usb_gadget struct to provide correctly aligned

[PATCH v2 08/10] usb: musb: tusb6010: Handle DMA TX completion in DMA callback as well

2017-05-10 Thread Peter Ujfalusi
Handle the DMA TX in a similar way as we do for the RX: in the DMA completion callback. Since we are no longer using DMA completion interrupt for the TX we can as wall keep these interrupts disabled, but keep the handler for debug purposes. Signed-off-by: Peter Ujfalusi

[PATCH v2 01/10] dmaengine: omap-dma: port_window support correction for both direction

2017-05-10 Thread Peter Ujfalusi
When the port_window support was verified it was done on setup where only the MEM_TO_DEV direction was enabled. This got un-noticed and thus only this direction worked. Now that I have managed to get a setup to verify both direction it turned out that the setup was incorrect: omap_desc members

[PATCH v2 06/10] usb: musb: tusb6010_omap: Create new struct for DMA data/parameters

2017-05-10 Thread Peter Ujfalusi
For the DMA we have ch (channel), dmareq and sync_dev parameters both within the tusb_omap_dma_ch and tusb_omap_dma_ch struct. By creating a common struct the code can be simplified when selecting between the shared or multichannel DMA parameters. Signed-off-by: Peter Ujfalusi

[PATCH v2 09/10] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines

2017-05-10 Thread Peter Ujfalusi
The external request lines are used by tusb6010 on OMAP24xx platforms. Update the map so the driver can use dmaengine API to request the DMA channel. At the same time add temporary map containing only the external DMA request numbers for DT booted case on omap24xx since the tusb6010 stack is not

[PATCH v2 04/10] usb: musb: tusb6010_omap: Use one musb_ep_select call in tusb_omap_dma_program

2017-05-10 Thread Peter Ujfalusi
Having one musb_ep_select() instead the two calls in if/else is the same thing, but makes the code a bit simpler to follow. Signed-off-by: Peter Ujfalusi --- drivers/usb/musb/tusb6010_omap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v2 07/10] usb: musb: tusb6010_omap: Allocate DMA channels upfront

2017-05-10 Thread Peter Ujfalusi
Instead of requesting the DMA channel in tusb_omap_dma_allocate() do it when the controller is created and in runtime work from the DMA channel pool. This change is needed for the DMAengine conversion of the driver since the tusb_omap_dma_allocate() is called in interrupt context which might lead

Re: [PATCH 7/7] usb: dwc3: add ReST documentation

2017-05-10 Thread Felipe Balbi
Hi, Bin Liu writes: >> Greg Kroah-Hartman writes: >> >>> Greg Kroah-Hartman writes: >> >> > On Tue, May 09, 2017 at 10:10:45AM +0300, Felipe Balbi wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> Felipe Balbi

RE: [PATCH 5/7] usb: dwc3: debug: remove static char buffer from dwc3_decode_event()

2017-05-10 Thread Felipe Balbi
Hi, David Laight writes: > From: Felipe Balbi >> Sent: 09 May 2017 08:07 >> Instead, we can require caller to pass a buffer for the function to >> use. This cleans things quite a bit. > ... >> -dwc3_gadget_event_string(const struct dwc3_event_devt *event) >>