]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commit
mtd: gpmi-nand: fix read page when reading to vmalloced area
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 26 Jun 2012 15:26:16 +0000 (17:26 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 6 Jul 2012 14:06:23 +0000 (15:06 +0100)
commit6023813a2d5949ba368e7df464f2ccb649719777
treebbc874c7e097539bcc03a841a2ae45d79811413a
parent096bcc231fd263bc8df215f0d616b08e3696c6db
mtd: gpmi-nand: fix read page when reading to vmalloced area

The gpmi-nand driver uses virt_addr_valid() to check whether a buffer
is suitable for dma. If it's not, a driver allocated buffer is used
instead. Then after a page read the driver allocated buffer must be
copied to the user supplied buffer. This does not happen since commit
7725cc85932bd02dd12c23108e0ef748c551ccba.

This patch fixes the issue. The bug is encountered with UBI which uses a
vmalloced buffer for the volume table.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: snijsure@grid-net.com
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c