lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Apr 2016 09:29:09 -0500
From:	Rob Herring <robh@...nel.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arm-kernel@...ts.infradead.org,
	Nava kishore Manne <nava.manne@...inx.com>,
	mark.rutland@....com, devicetree@...r.kernel.org, navam@...inx.com,
	hyun.kwon@...inx.com, pawel.moll@....com,
	ijc+devicetree@...lion.org.uk, gregkh@...uxfoundation.org,
	radhey.shyam.pandey@...inx.com, michal.simek@...inx.com,
	balbi@...com, linux-kernel@...r.kernel.org, galak@...eaurora.org,
	soren.brinkmann@...inx.com
Subject: Re: [PATCH] Axi-usb: Add support for 64-bit addressing.

On Sun, Apr 17, 2016 at 03:14:34PM +0200, Arnd Bergmann wrote:
> On Tuesday 12 April 2016 09:03:38 Rob Herring wrote:
> > On Mon, Apr 11, 2016 at 01:11:46PM +0530, Nava kishore Manne wrote:
> > > This patch updates the driver to support 64-bit DMA
> > > addressing.
> > > 
> > > Signed-off-by: Nava kishore Manne <navam@...inx.com>
> > > ---
> > >  .../devicetree/bindings/usb/udc-xilinx.txt         |  3 +-
> > >  drivers/usb/gadget/udc/udc-xilinx.c                | 38 ++++++++++++++++++++--
> > >  2 files changed, 37 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/usb/udc-xilinx.txt b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
> > > index 47b4e39..d417872 100644
> > > --- a/Documentation/devicetree/bindings/usb/udc-xilinx.txt
> > > +++ b/Documentation/devicetree/bindings/usb/udc-xilinx.txt
> > > @@ -7,12 +7,13 @@ Required properties:
> > >  - interrupts         : Should contain single irq line of USB2 device
> > >                         controller
> > >  - xlnx,has-builtin-dma       : if DMA is included
> > > -
> > > +- xlnx,addrwidth       : Should be the dma addressing size in bits(ex: 40 bits).
> > 
> > Now this property shows up in a 2nd device. Now I'm more convinced this 
> > is the wrong approach and should use dma-ranges.
> 
> Not necessarily: We need to be careful not to mix up two different things here:
> 
> * dma-ranges describes the address width of a bus, along with possible offsets.
>   In order to do wider than 32-bit addressing, all upstream busses must be
>   capable of supporting this, and AXI can have either 64-bit or 32-bit addressing.
> 
> * A device may have a register set that allows wider DMA. This is normally
>   identified through the 'compatible' property, and you can have all
>   combinations with bus addressing: a device with 32-bit DMA can be connected
>   to a 64-bit AXI bus, and a device with 64-bit DMA can have an upstream parent
>   or grandparent that is limited to 32 bits (or any other width really).
> 
> The patch here is almost certainly wrong. For one thing, it never sets the
> DMA mask to the correct value, and it also infers the presence of the
> 0x308..0x317 register range from an arbitrary DT property that describes
> something else (the supported width of the DMA).

Right, you don't need to know the exact bus width for determining the 
register/descriptor set is 32 or 64 bit addesses. I'm fine with a 
property for that, but if limiting the actual connected address bits is 
needed, then dma-ranges should be used.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ