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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 1 Jan 2022 13:12:43 +0530 From: Apurva Nandan <a-nandan@...com> To: Miquel Raynal <miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>, Mark Brown <broonie@...nel.org>, Apurva Nandan <a-nandan@...com>, Patrice Chotard <patrice.chotard@...s.st.com>, Christophe Kerello <christophe.kerello@...s.st.com>, Boris Brezillon <boris.brezillon@...labora.com>, Daniel Palmer <daniel@...f.com>, Alexander Lobakin <alobakin@...me>, <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>, <linux-spi@...r.kernel.org> CC: <p.yadav@...com> Subject: [PATCH v3 10/17] mtd: spinand: Add pointer to probed flash's spinand_info The data_ops_variants and ctrl_ops_variants defined in manufacturer's code are required again when changing flash modes, because they hold the op templates for the new protocol. It would be useful to have a pointer to the device description entry i.e. probed flash's spinand_info table in the spinand_device struct itself. Signed-off-by: Apurva Nandan <a-nandan@...com> --- drivers/mtd/nand/spi/core.c | 1 + include/linux/mtd/spinand.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 9688fdfc174e..1a602e4dd6bd 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -1107,6 +1107,7 @@ int spinand_match_and_init(struct spinand_device *spinand, spinand->flags = table[i].flags; spinand->id.len = 1 + table[i].devid.len; spinand->select_target = table[i].select_target; + spinand->desc_entry = &table[i]; op = spinand_select_data_op_variant(spinand, info->data_ops_variants.read_cache); diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index ad924271a248..a8c071983a27 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -534,6 +534,8 @@ struct spinand_dirmap { * passed in spi_mem_op be DMA-able, so we can't based the bufs on * the stack * @manufacturer: SPI NAND manufacturer information + * @desc_entry: pointer to device description entry in the manufacturer's + * spinand_info tables * @priv: manufacturer private data */ struct spinand_device { @@ -566,6 +568,7 @@ struct spinand_device { u8 *oobbuf; u8 *scratchbuf; const struct spinand_manufacturer *manufacturer; + const struct spinand_info *desc_entry; void *priv; }; -- 2.25.1
Powered by blists - more mailing lists