Re: kexec on rk3399

2019-08-15 Thread Robin Murphy
On 15/08/2019 07:06, Felipe Balbi wrote: Hi, Vicente Bergas writes: On Wednesday, August 14, 2019 3:12:26 PM CEST, Robin Murphy wrote: On 14/08/2019 13:53, Vicente Bergas wrote: On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: ... This particular change looks like it&#

Re: [PATCH 6/6] driver core: initialize a default DMA mask for platform device

2019-08-14 Thread Robin Murphy
On 11/08/2019 09:05, Christoph Hellwig wrote: We still treat devices without a DMA mask as defaulting to 32-bits for both mask, but a few releases ago we've started warning about such cases, as they require special cases to work around this sloppyness. Add a dma_mask field to struct platform_obje

Re: kexec on rk3399

2019-08-14 Thread Robin Murphy
On 14/08/2019 13:53, Vicente Bergas wrote: On Monday, July 22, 2019 4:31:27 PM CEST, Vicente Bergas wrote: Hi, i have been running linux on rk3399 booted with kexec fine until 5.2 From 5.2 onwards, there are memory corruption issues as reported here: http://lkml.iu.edu/hypermail/linux/kernel/190

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 11:07 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kerne

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma code is mapping randomish kernel/user mem to a user process" seems to have security implications even thou

Re: [PATCH v3 3/7] drivers: Introduce device lookup variants by fwnode

2019-07-24 Thread Robin Murphy
artman Cc: Heikki Krogerus Cc: Jason Gunthorpe Cc: linux-usb@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Greg Kroah-Hartman Cc: Ulf Hansson Cc: Joe Perches Cc: Mathieu Poirier Cc: Will Deacon Cc: Robin Murphy Cc: Joerg Roedel Signed-off-by: Suzuki K Poulose ---

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-14 Thread Robin Murphy
+Fredrik, Juergen On 14/05/2019 15:38, laurentiu.tu...@nxp.com wrote: From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent"

Re: [PATCH 10/18] smc911x: pass struct device to DMA API functions

2019-02-01 Thread Robin Murphy
On 01/02/2019 08:47, Christoph Hellwig wrote: The DMA API generally relies on a struct device to work properly, and only barely works without one for legacy reasons. Pass the easily available struct device from the platform_device to remedy this. Hmm, as far as I'm aware these are PIO chips wi

Re: [PATCH 03/18] net: caif: pass struct device to DMA API functions

2019-02-01 Thread Robin Murphy
On 01/02/2019 08:47, Christoph Hellwig wrote: The DMA API generally relies on a struct device to work properly, and only barely works without one for legacy reasons. Pass the easily available struct device from the platform_device to remedy this. Also use the proper Kconfig symbol to check for

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 fo

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: +"us

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: 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 b3

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 proper

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 v

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

2018-02-06 Thread Robin Murphy
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 Thanks, Robin. This series is against

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: "dma_pool

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 diff

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() >> already spl

[PATCH] xhci: Set DMA parameters appropriately

2017-10-11 Thread Robin Murphy
m, so 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 --- drivers/usb/host/xhci.c | 4 drivers/usb/host/xhci.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/usb/host/xhc

[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 --- drivers/usb/host

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. >> >

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 seg

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 >>>

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Robin Murphy
earlier thread here [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

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: 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 appea

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: [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")

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

2017-08-03 Thread Robin Murphy
t; probed. > > 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#

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

2017-08-03 Thread Robin Murphy
gt; dwc2 3f98.usb: Cannot do DMA to address 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

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 handling').

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 >>> >>> [ 16

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

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

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 I'

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 >&g

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=, *ppte=

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 Sa

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(&pdev->dev, dev->

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 yet! Can we get to