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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXNXigqkSL6L1Jr0@smile.fi.intel.com>
Date: Fri, 23 Jan 2026 13:12:10 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Francesco Lavra <flavra@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
	Ramona Gradinariu <ramona.gradinariu@...log.com>,
	Antoniu Miclaus <antoniu.miclaus@...log.com>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	David Lechner <dlechner@...libre.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: accel: adxl380: Optimize reading of FIFO
 entries in interrupt handler

On Fri, Jan 23, 2026 at 12:09:36PM +0100, Francesco Lavra wrote:
> On Fri, 2026-01-23 at 09:54 +0000, Jonathan Cameron wrote:
> > On Fri, 23 Jan 2026 10:13:16 +0200
> > Andy Shevchenko <andriy.shevchenko@...el.com> wrote:
> > > On Thu, Jan 22, 2026 at 07:53:13PM +0000, Jonathan Cameron wrote:
> > > > On Mon, 19 Jan 2026 11:23:17 +0100
> > > > Francesco Lavra <flavra@...libre.com> wrote:
> > > >   
> > > > > In order to minimize the time required for transferring FIFO data
> > > > > from the
> > > > > sensor to the host machine, perform the read from the FIFO in a
> > > > > single call
> > > > > to regmap_bulk_read().  
> > > 
> > > > It's a call to regmap_noinc_read()  not regmap_bulk_read()
> > > > I'll fix it.  
> > > 
> > > This is interesting, does it mean the patch was never tested on the
> > > real HW?
> 
> The driver has been tested (by me) on real hardware, both before and after
> this patch.
> 
> > > Or maybe noninc is intentional?
> > > 
> > It's absolutely intentional.  The device presents a single register
> > address
> > that has the fifo behind it (which is what we added noinc for years ago).
> > So patch should definitely work.  Goes from reading that register N times
> > in
> > each call within a loop of M to reading it N x M.
> > 
> > If regcache is in use this makes a difference as avoids corrupting
> > registers
> > after this point as the address increment expected in the hardware for
> > a bulk read doesn't happen.  Without regcache it's just "documentation"
> > as
> > at least for protocols used here its the same as a bulk read on the bus.
> > 
> > So patch is fine, it just mentioned the wrong call in the description
> > I'd guess this is because someone is working with a tree that has the
> > wrong call in
> > it but might be wrong.
> 
> I have this patch applied also to older kernel versions where
> regmap_noinc_read() doesn't exist, so this is just a copy-paste error in
> the commit message. Sorry about that.

Thanks for clarifying this!

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ