Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1530720 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-11-26 19:20 +0100 |
| Last post | 2016-11-26 19:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 07/39] mtd: nand: denali: transfer OOB only when oob_required is set Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-11-26 19:20 +0100
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-11-26 19:20 +0100 |
| Subject | [PATCH 07/39] mtd: nand: denali: transfer OOB only when oob_required is set |
| Message-ID | <sHPJT-1GL-3@gated-at.bofh.it> |
Currently, the denali_read_page_raw() always transfers the OOB and copy the data to chip->oob_poi, ignoring the oob_required argument. Respect the oob_required argument. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mtd/nand/denali.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index b2b050b..cbc7f75 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1182,7 +1182,7 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, BUG(); } - setup_ecc_for_xfer(denali, false, true); + setup_ecc_for_xfer(denali, false, oob_required ? true : false); denali_enable_dma(denali, true); dma_sync_single_for_device(denali->dev, addr, size, DMA_FROM_DEVICE); @@ -1198,7 +1198,9 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, denali_enable_dma(denali, false); memcpy(buf, denali->buf.buf, mtd->writesize); - memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, mtd->oobsize); + if (oob_required) + memcpy(chip->oob_poi, denali->buf.buf + mtd->writesize, + mtd->oobsize); return 0; } -- 2.7.4
Back to top | Article view | linux.kernel
csiph-web