Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-02 Thread Robin Murphy
On 02/09/16 11:53, Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: >> On Thursday, September 1, 2016 5:14:28 PM CEST Leo Li wrote: >>> >>> Hi Felipe and Arnd, >>> >>> It has been a while since the last response to this discussion, but we >>> haven't reached an agreement

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Robin Murphy
On 07/09/16 10:55, Peter Chen wrote: [...] >> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> I think we should replace >> >> pdev->dev.dma_mask = dev->dma_mask; >> pdev->dev.dma_parms = dev->dma_parms; >> dma_set_coherent_mask(>dev,

Re: ARM juno R2 board USB Issue (EHCI probe failed)

2016-09-27 Thread Robin Murphy
On 27/09/16 17:13, Hanjun Guo wrote: > On 09/27/2016 05:07 PM, Sudeep Holla wrote: >> >> >> On 27/09/16 09:55, Sajjan, Vikas C wrote: >>> Hi Sudeep, >>> >>> -Original Message- >>> From: Sudeep Holla [mailto:sudeep.ho...@arm.com] >>> Sent: Tuesday, September 27, 2016 2:21 PM >>> To: Vikas

Re: Panic in quirk_usb_early_handoff

2017-03-03 Thread Robin Murphy
On 03/03/17 17:15, Mason wrote: [...] >>> [1.264893] Unable to handle kernel paging request at virtual address >>> d08664f4 Note that that's a reasonable approximation of a vmalloc address... >>> [1.272248] pgd = c0004000 >>> [1.275060] [d08664f4] *pgd=8f804811, *pte=,

Re: Neophyte questions about PCIe

2017-03-10 Thread Robin Murphy
On 09/03/17 23:43, Mason wrote: > On 08/03/2017 16:17, Bjorn Helgaas wrote: > [snip excellent in-depth overview] > > I think I'm making progress, in that I now have a better > idea of what I don't understand. So I'm able to ask > (hopefully) less vague questions. > > Take the USB3 PCIe adapter

Re: Neophyte questions about PCIe

2017-03-10 Thread Robin Murphy
On 10/03/17 15:05, Mason wrote: > On 10/03/2017 15:06, David Laight wrote: > >> Robin Murphy wrote: >> >>> On 09/03/17 23:43, Mason wrote: >>> >>>> I think I'm making progress, in that I now have a better >>>> idea of what I don'

Re: Neophyte questions about PCIe

2017-03-10 Thread Robin Murphy
On 10/03/17 15:35, David Laight wrote: > From: Robin Murphy >> Sent: 10 March 2017 15:23 > ... >>>> So you have 128MB (max) of system memory that has cpu physical >>>> addresses 0x8000 upwards. >>>> I'd expect it all to be accessible from a

Re: Panic in quirk_usb_early_handoff

2017-03-06 Thread Robin Murphy
[+linux-pci, just in case] On 06/03/17 12:42, Mason wrote: > On 03/03/2017 20:02, Robin Murphy wrote: > >> On 03/03/17 17:15, Mason wrote: >> >>>>> [1.264893] Unable to handle kernel paging request at virtual address >>>>> d08664f4 &

Re: Rpi3: no ethernet in 4.13: bisected to patch 'USB: of: fix root-hub device-tree node handling'

2017-08-02 Thread Robin Murphy
On 02/08/17 12:10, Stefan Wahren wrote: > Am 02.08.2017 um 09:03 schrieb Hans Verkuil: >> When testing with my Raspberry Pi 3 and the 4.13-rcX mainline kernel >> I discovered that there was no ethernet. After bisecting I got to commit >> 2bf69867 ('USB: of: fix root-hub device-tree node

Re: [PATCH v2] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-03 Thread Robin Murphy
;>> Fix this, and similar future problems, by simply skipping USB devices >>> when dma_configure() is called during probe. >>> >>> Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for >>> platform/amba/pci bus devices") >&g

Re: [PATCH v2] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-03 Thread Robin Murphy
obed. > > Fix this, and similar future problems, by simply skipping USB devices > when dma_configure() is called during probe. > > Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for > platform/amba/pci bus devices") > Cc: stable <sta...@vge

Re: No Ethernet on Raspberry Pi 3 in v4.13-rc1

2017-07-25 Thread Robin Murphy
Hi Stefan, On 25/07/17 06:19, Stefan Wahren wrote: >>> With arm64 4.13-rc1 I get no eth0 device on Pi3 (openSUSE Tumbleweed). >>> The v4.13-rc1 DT works okay with a 4.12 kernel. >>> >>> Possibly related: >>> >>> [ 15.916350] OF: /soc/usb@7e98: could not get #phy-cells for /phy >>> >>> [

Re: [PATCH] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-03 Thread Robin Murphy
ess 0x3a166a00 > > Fix this, and similar future problems, by simply skipping USB devices > when dma_configure() is called during probe. > > Fixes: 09515ef5ddad ("of/acpi: Configure dma operations at probe time for > platform/amba/pci bus devices") > Cc: s

Re: [PATCH 1/2] ARM: dts: exynos: Add dwc3 SUSPHY quirk

2017-09-19 Thread Robin Murphy
On 19/09/17 18:40, Krzysztof Kozlowski wrote: > On Mon, Sep 18, 2017 at 12:02:13PM +0200, Andrzej Pietrasiewicz wrote: >> Odroid XU4 board does not enumerate SuperSpeed devices. >> This patch makes exynos5 series chips use USB SUSPHY quirk, >> which solves the problem. >> >> Signed-off-by: Andrzej

Re: the imfamous asix ax88179 iommu error

2017-10-06 Thread Robin Murphy
On 06/10/17 13:14, Robin Murphy wrote: > Hi Will, > > On 06/10/17 01:19, Will Trives wrote: >> Hello, >> >> Just reporting that it looks like this patch may fix the error (so >> people having issues with VIA controller hosts may also want to try it): >&g

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Robin Murphy
[2] about a similar/the same(?) device, but >> that doesn't >> seem to have worked. >> >> Help, please. I have no idea how to debug this further. >> > > Could it maybe be related to a iommu/vt-d: Fix scatterlist offset > handling fix: > https://lists.li

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Robin Murphy
On 09/10/17 16:49, Robin Murphy wrote: > On 09/10/17 10:22, Mathias Nyman wrote: >> On 08.10.2017 17:03, Hao Wei Tee wrote: >>> Hi, >>> >>> I've been having DMA read faults with my VL805 xHCI controller when >>> the Intel IOMMU >>> is tu

[PATCH] xhci: Cope with VIA VL805 readahead

2017-10-10 Thread Robin Murphy
investigation reveals that we can avoid such cross-page reads by not using the last few TRBs in a segment; to that end, factor out the implicit index of the end-of-segemnt link TRB, and implement a quirk to move it slightly further forward when necessary. Signed-off-by: Robin Murphy <robin.mur...@arm.

Re: VL805 xHCI DMA read faults

2017-10-10 Thread Robin Murphy
On 10/10/17 15:24, David Laight wrote: > From: Mathias Nyman >> Sent: 10 October 2017 15:13 > ... >> [ 428.409645] print_req_error: I/O error, dev sdb, sector 128 >> [ 428.426612] arm-smmu 2b50.iommu: Unhandled context fault: fsr=0x8, >> iova=0xff0b1000, >> fsynr=0x183, cb=0 >> >> a ring

Re: VL805 xHCI DMA read faults

2017-10-10 Thread Robin Murphy
On 10/10/17 16:51, David Laight wrote: > From: Robin Murphy >> Sent: 10 October 2017 16:25 > ... >>> That could 'just' be the hardware doing a 'readahead' of the ring. >>> Somewhat annoying if it is doing that across page boundaries. >> >>> Although, i

Re: [PATCH] xhci: Set DMA parameters appropriately

2017-10-13 Thread Robin Murphy
Hi Marek, On 13/10/17 09:15, Marek Szyprowski wrote: > Hi Robin, > > On 2017-10-11 15:56, Robin Murphy wrote: >> xHCI requires that data buffers do not cross 64KB boundaries (and are >> thus at most 64KB long as well) - whilst xhci_queue_{bulk,isoc}_tx() >> alread

Re: VL805 xHCI DMA read faults

2017-10-16 Thread Robin Murphy
On 16/10/17 12:54, Hao Wei Tee wrote: > On 12/10/2017 21:36, Mathias Nyman wrote: >> You could try booting with xhci_hcd.dyndbg=+p added to the kernel command >> line. > > I can't find anything relevant... Hmm. Is your VL805 on the motherboard or an add-on card? One other possibly important

Re: the imfamous asix ax88179 iommu error

2017-10-06 Thread Robin Murphy
Hi Will, On 06/10/17 01:19, Will Trives wrote: > Hello, > > Just reporting that it looks like this patch may fix the error (so > people having issues with VIA controller hosts may also want to try it): > > https://lists.linuxfoundation.org/pipermail/iommu/2017-September/024371.html > > It

[PATCH] xhci: Set DMA parameters appropriately

2017-10-11 Thread Robin Murphy
that most producers like the block layer and the DMA mapping implementations can lay things out correctly to begin with. Signed-off-by: Robin Murphy <robin.mur...@arm.com> --- drivers/usb/host/xhci.c | 4 drivers/usb/host/xhci.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/d

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Robin Murphy
it is possible to configure out, so it does seem like a reasonable feature to assume. Maybe we could have something like asm-generic/no-io.h to provide an "unimplemented" version of those interfaces. Anyway, for this series: Acked-by: Robin Murphy <robin.mur...@arm.com> Thanks, Robi

Re: [PATCH/RFC 4/6] mm: Add NO_DMA dummies for DMA pool API

2018-02-06 Thread Robin Murphy
Hi Geert, On 06/02/18 10:14, Geert Uytterhoeven wrote: Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR:

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-13 Thread Robin Murphy
On 11/03/18 18:01, Fredrik Noring wrote: Hi Christoph, The point is that you should always use a pool, period. dma_alloc*/dma_free* are fundamentally expensive operations on my architectures, so if you call them from a fast path you are doing something wrong. The author's comment in commit

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-15 Thread Robin Murphy
On 12/03/18 10:41, Roger Quadros wrote: [...] @@ -0,0 +1,75 @@ +USB Connector += + +USB connector node represents physical USB connector. It should be +a child of USB interface controller. + +Required properties: +- compatible: describes type of the connector, must be one of: +

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-15 Thread Robin Murphy
On 15/03/18 07:58, Christoph Hellwig wrote: On Wed, Mar 14, 2018 at 05:43:46PM +, Robin Murphy wrote: Looking back I don't really understand why we even indirect the "classic" per-device dma_declare_coherent_memory use case through the DMA API. It certainly makes sense for dev

Re: [PATCH v4 1/2] dt-bindings: usb: ehci: add optional external vbus supply property

2018-03-06 Thread Robin Murphy
On 06/03/18 01:57, Rob Herring wrote: On Thu, Mar 01, 2018 at 10:51:38AM +0100, Amelie Delaunay wrote: On some boards, especially when vbus supply requires large current, and the charge pump on the PHY isn't enough, an external vbus power switch per port may be used. Add portN_vbus-supply

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-14 Thread Robin Murphy
On 13/03/18 13:17, Christoph Hellwig wrote: On Tue, Mar 13, 2018 at 12:11:49PM +, Robin Murphy wrote: Taking a step back, though, provided the original rationale about dma_declare_coherent_memory() is still valid, I wonder if we should simply permit the USB code to call dma_{alloc,free

Re: [PATCH v3] usb: host: ehci-platform: add support for optional external vbus supply

2018-02-28 Thread Robin Murphy
Hi Amelie, Just a couple of drive-by coding style comments... On 23/02/18 13:46, Amelie Delaunay wrote: On some boards, especially when vbus supply requires large current, and the charge pump on the PHY isn't enough, an external vbus power switch may be used. Add support for optional external