Thread (7 messages) flat view 7 messages, 3 authors, 2015-09-21

[PATCH v4] mtd: nand: sunxi: fix OOB handling in ->write_xxx() functions

From: computersforpeace@gmail.com (Brian Norris)
Date: 2015-09-21 20:43:55
Also in: stable

On Mon, Sep 14, 2015 at 10:02:04AM -0700, Brian Norris wrote:
On Mon, Sep 14, 2015 at 10:41:03AM +0200, Boris Brezillon wrote:
quoted
The USER_DATA register cannot be accessed using byte accessors on A13
SoCs, thus triggering a bug when using memcpy_toio on this register.
Declare an helper macros to convert an OOB buffer into a suitable
USER_DATA value and vice-versa.

This patch also fixes an error in the oob_required logic (some OOB data
are not written even if the user required it) by removing the
oob_required condition, which is perfectly valid since the core already
fill ->oob_poi with FFs when oob_required is false.

Signed-off-by: Boris Brezillon <redacted>
Cc: <redacted> # 3.19+
Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")

---
Changes since v3:
- drop the NFC_USER_DATA_TO_BUF() macro
I don't have any real objections to this version, and I think some IRC
discussion helped clear up a few questions. I'll take this for 4.3 soon,
unless I see any objections.
Pushed to linux-mtd.git.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help