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] [day] [month] [year] [list]
Message-ID: <20120525085649.GA8495@S2100-06.ap.freescale.net>
Date:	Fri, 25 May 2012 16:56:51 +0800
From:	Shawn Guo <shawn.guo@...escale.com>
To:	Marc Reilly <marc@...esign.com.au>
CC:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Sascha Hauer <kernel@...gutronix.de>,
	Philippe Rétornaz <philippe.retornaz@...l.ch>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: mc13xxx-core: kernel hangs after 'regmap_read'

On Thu, May 24, 2012 at 07:08:37PM +1000, Marc Reilly wrote:
> > diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
> > index 3fcdab3..5d1969f 100644
> > --- a/drivers/mfd/mc13xxx-spi.c
> > +++ b/drivers/mfd/mc13xxx-spi.c
> > @@ -49,6 +49,7 @@ static struct regmap_config mc13xxx_regmap_spi_config = {
> >         .reg_bits = 7,
> >         .pad_bits = 1,
> >         .val_bits = 24,
> > +       .write_flag_mask = 0x80,
> 
> Should probably have .read_flag_mask = 0x00, here too. If either are non zero, 
> both are set.
> 
Since mc13xxx_regmap_spi_config is a static variable, .read_flag_mask
is initialized as 0 already.

> I guess this is the problem, regmap's default read_flag_mask for the spi bus 
> is 0x80, and the write mask defaults to 0. The mc13xxx works the opposite way 
> though! aarg. My bad for not noticing. So setting the write_flag_mask to 0x80 
> also sets the read mask to 0 correctly also.

-- 
Regards,
Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ