OrangePi_CM5/include/linux/mtd
Oleksandr Ocheretnyi 6f2bf9c5dd mtd: fix 'part' field data corruption in mtd_info
[ Upstream commit 37c5f9e80e015d0df17d0c377c18523002986851 ]

Commit 46b5889cc2 ("mtd: implement proper partition handling")
started using "mtd_get_master_ofs()" in mtd callbacks to determine
memory offsets by means of 'part' field from mtd_info, what previously
was smashed accessing 'master' field in the mtd_set_dev_defaults() method.
That provides wrong offset what causes hardware access errors.

Just make 'part', 'master' as separate fields, rather than using
union type to avoid 'part' data corruption when mtd_set_dev_defaults()
is called.

Fixes: 46b5889cc2 ("mtd: implement proper partition handling")
Signed-off-by: Oleksandr Ocheretnyi <oocheret@cisco.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220417184649.449289-1-oocheret@cisco.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-09 09:05:02 +02:00
..
bbm.h
…
blktrans.h
…
cfi.h
…
cfi_endian.h
…
concat.h
…
doc2000.h
…
flashchip.h
…
ftl.h
…
gen_probe.h
…
hyperbus.h
…
inftl.h
…
jedec.h
…
latch-addr-flash.h
…
lpc32xx_mlc.h
…
lpc32xx_slc.h
…
map.h
…
mtd.h
…
mtdram.h
…
nand-gpio.h
…
nand.h
…
nand_bch.h
…
nand_ecc.h
…
ndfc.h
…
nftl.h
…
onenand.h
…
onenand_regs.h
…
onfi.h
…
partitions.h
…
pfow.h
…
physmap.h
…
pismo.h
…
plat-ram.h
…
platnand.h
…
qinfo.h
…
rawnand.h
…
sh_flctl.h
…
sharpsl.h
…
spear_smi.h
…
spi-nor.h
…
spinand.h
…
super.h
…
ubi.h
…
xip.h
…