[PATCH v10 3/3] MTD: at91: atmel_nand: Update driver to support Programmable Multibit ECC controller
Artem Bityutskiy
dedekind1 at gmail.com
Tue Jun 5 09:04:17 EDT 2012
On Fri, 2012-06-01 at 18:13 +0800, Josh Wu wrote:
> + end_time = jiffies + msecs_to_jiffies(PMECC_MAX_TIMEOUT_MS);
> + while ((pmecc_readl_relaxed(host->ecc, SR) & PMECC_SR_BUSY)) {
> + if (unlikely(time_after(jiffies, end_time))) {
> + dev_err(host->dev, "PMECC: Timeout to get ECC
> value.\n");
> + BUG();
> + }
> + cpu_relax();
> + }
Sorry, but crashing the kernel is the worst thing to do. You should make
'->write_page()' allow to return an error code, just like
'->read_page()' does.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120605/64e19bed/attachment.sig>
More information about the linux-arm-kernel
mailing list