linux/drivers/mtd/devices
Arnd Bergmann c595f953a9 mtd: docg3: don't set conflicting BCH_CONST_PARAMS option
commit be2e1c9dcf upstream.

I noticed during the creation of another bugfix that the BCH_CONST_PARAMS
option that is set by DOCG3 breaks setting variable parameters for any
other users of the BCH library code.

The only other user we have today is the MTD_NAND software BCH
implementation (most flash controllers use hardware BCH these days
and are not affected). I considered removing BCH_CONST_PARAMS entirely
because of the inherent conflict, but according to the description in
lib/bch.c there is a significant performance benefit in keeping it.

To avoid the immediate problem of the conflict between MTD_NAND_BCH
and DOCG3, this only sets the constant parameters if MTD_NAND_BCH
is disabled, which should fix the problem for all cases that
are affected. This should also work for all stable kernels.

Note that there is only one machine that actually seems to use the
DOCG3 driver (arch/arm/mach-pxa/mioa701.c), so most users should have
the driver disabled, but it almost certainly shows up if we wanted
to test random kernels on machines that use software BCH in MTD.

Fixes: d13d19ece3 ("mtd: docg3: add ECC correction code")
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:53:48 +00:00
..
bcm47xxsflash.c mtd: bcm47xxsflash: writing support 2013-08-30 21:52:20 +01:00
bcm47xxsflash.h mtd: bcm47xxsflash: implement ChipCommon R/W ops 2013-08-05 18:20:32 +01:00
block2mtd.c mtd: block2mtd: check device size 2014-03-10 22:42:31 -07:00
docg3.c drivers/mtd/devices/docg3.c: avoid world-writable sysfs files. 2014-05-14 10:53:53 +09:30
docg3.h mtd: docg3 add protection against concurrency 2012-03-27 01:03:27 +01:00
elm.c mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions 2014-07-05 15:44:42 -07:00
Kconfig mtd: docg3: don't set conflicting BCH_CONST_PARAMS option 2019-02-11 17:53:48 +00:00
lart.c mtd: move zero length verification to MTD API functions 2012-03-27 00:32:19 +01:00
m25p80.c mtd: m25p80,spi-nor: Fix module aliases for m25p80 2014-11-13 11:48:34 +00:00
Makefile mtd: st_spi_fsm: Allocate resources and register with MTD framework 2014-03-20 04:17:14 -07:00
ms02-nv.c mtd: ms02-nv: remove superfluous name cast 2014-01-03 11:22:09 -08:00
ms02-nv.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
mtd_dataflash.c mtd: Fix the behavior of OTP write if there is not enough room for data 2014-03-10 22:42:31 -07:00
mtdram.c mtd: mtdram: add missing 'const' 2014-01-20 11:55:23 -08:00
phram.c mtd: phram: Repair multiple instances support 2014-03-10 22:42:21 -07:00
pmc551.c mtd: pmc551: Remove unnecessary OOM messages 2014-03-10 22:42:24 -07:00
serial_flash_cmds.h mtd: st_spi_fsm: begin using spi-nor.h opcodes 2014-04-14 11:23:01 -07:00
slram.c mtd: slram: fix unused variable warning 2014-05-28 00:05:24 -07:00
spear_smi.c Shiraz has moved 2014-04-18 16:40:08 -07:00
sst25l.c mtd: delete non-required instances of include <linux/init.h> 2014-03-10 22:42:22 -07:00
st_spi_fsm.c mtd: st_spi_fsm: Make of_device_id array const 2014-05-20 16:35:29 -07:00