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]
Message-ID: <AM5PR0402MB2865711AB90A1FE18F00852CF1850@AM5PR0402MB2865.eurprd04.prod.outlook.com>
Date:   Fri, 11 Jan 2019 09:10:57 +0000
From:   Ran Wang <ran.wang_1@....com>
To:     Alan Stern <stern@...land.harvard.edu>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/3] usb: ehci: fsl: Update register accessing for
 arm/arm64 platforms

Hi Alan,

On Thursday, January 10, 2019, Alan wrote:
> 
> On Thu, 10 Jan 2019, Ran Wang wrote:
> 
> > Hi Alan,
> >
> > > -----Original Message-----
> > > From: Alan Stern <stern@...land.harvard.edu>
> > > Sent: Wednesday, January 09, 2019 23:14
> > > To: Ran Wang <ran.wang_1@....com>
> > > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>; linux-
> > > usb@...r.kernel.org; linux-kernel@...r.kernel.org
> > > Subject: RE: [PATCH 2/3] usb: ehci: fsl: Update register accessing
> > > for
> > > arm/arm64 platforms
> > >
> > > On Wed, 9 Jan 2019, Ran Wang wrote:
> > >
> > > > > Why do you change this writel() into iowrite32be() but leave
> > > > > other instances of writel() unchanged?  Was this a mistake?
> > > >
> > > > Yes, I didn't notice there are other writel() used in this file.
> > > > However, as I know, on both powerpc and arm SoC, EHCI FSL IP's
> > > > memory mapped register block is always Big-endian, so I'd like to
> > > > replace all
> > > > writel() with iowrite32be() in this file. Is it necessary?
> > > >
> > > > Or I just replace them with ehci_writel() and select
> > > CONFIG_USB_EHCI_BIG_ENDIAN_MMIO?
> > >
> > > That should work okay.  ehci_fsl_setup() sets ehci->big_endian_desc
> > > and
> > > ehci->big_endian_mmio according to the platform data, so you just
> > > ehci->have
> > > to make sure the platform data is initialized correctly.
> > >
> > OK, so I should not change writel() into iowrite32be() at that place
> > you mentioned, and still using iowrite32be()/ioread32be() to replace
> > clrsetbits_be32(), am I right?
> 
> Actually, I think it would be good to use ehci_writel() and
> ehci_readl() everywhere except in fsl_ehci_drv_probe().
> 
> But if you prefer to use iowrite32be() and ioread32be() instead, that's
> probably okay.  (However, it won't work if anyone ever produces a little-
> endian version of the IP.)

Got it, I'll verify with ehci_readl() then work out the v2 patch if pass.
Thanks for advice.

Regards,
Ran

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ