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: <CAOMZO5DKLO5B7vbMKmXLfmR0zgVX5bVcxK22khTt=X71bL5tOQ@mail.gmail.com>
Date:	Wed, 23 May 2012 11:18:10 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	marc@...esign.com.au, 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'

Mark,

On Wed, May 23, 2012 at 5:49 AM, Mark Brown
<broonie@...nsource.wolfsonmicro.com> wrote:

> You shouldn't be setting bits_per_word at all, that'll corrupt the data
> that regmap has formatted.  Does removing that alone resolve the issue?

Removing only the line that sets bits_per_word:

--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -73,7 +73,6 @@ static int mc13xxx_spi_probe(struct spi_device *spi)

        dev_set_drvdata(&spi->dev, mc13xxx);
        spi->mode = SPI_MODE_0 | SPI_CS_HIGH;
-       spi->bits_per_word = 32;

        mc13xxx->dev = &spi->dev;
        mutex_init(&mc13xxx->lock);


, does allow the kernel to boot, but the mx13xxx driver is not probed anymore:

spi_imx imx31-cspi.1: master is unqueued, this is deprecated
spi_imx imx31-cspi.1: probed
spi_imx imx31-cspi.0: master is unqueued, this is deprecated
l4f00242t03 spi0.0: l4f00242t03_probe: Unable to get the IO regulator
spi spi0.0: Driver l4f00242t03 requests probe deferral
spi_imx imx31-cspi.0: probed

Also, on the previous raw spi access version we had:

#define MC13XXX_REGOFFSET_SHIFT 25
int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
{
	struct spi_transfer t;
	struct spi_message m;
	int ret;

	BUG_ON(!mutex_is_locked(&mc13xxx->lock));

	if (offset > MC13XXX_NUMREGS)
		return -EINVAL;

	*val = offset << MC13XXX_REGOFFSET_SHIFT;
....

,would the spi regmap access take into account this
MC13XXX_REGOFFSET_SHIFT operation?

I haven't been able to see it in the regmap spi access.
--
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