RE: [PATCH] mtd: atmel_nand: fix access to 16 bit NAND devices

From: Venu Byravarasu
Date: Thu Feb 02 2012 - 22:35:46 EST


I see a problem with atmel_read_buf16 & atmel_write_buf16 functions.
As they are calling __raw_readsw & __raw_writesw respectively, which
would cause panic in cases of 16 bit unaligned buffers.
However, the buf passed to these functions is of type u8* from
atmel_read_buf & atmel_write_buf functions.

[Venu]
> - /* if no DMA operation possible, use PIO */
> - memcpy_fromio(buf, chip->IO_ADDR_R, len);
> + if (host->board->bus_width_16)
> + atmel_read_buf16(mtd, buf, len);

> + else
> + atmel_read_buf8(mtd, buf, len);
> }
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i