mtd: eLBC NAND: give more verbose output on error
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 30 05:59:05 EST 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c1317f7163d287805b8e12af12d04a2a6ead865c
Commit: c1317f7163d287805b8e12af12d04a2a6ead865c
Parent: 476459a6cf46d20ec73d9b211f3894ced5f9871e
Author: Scott Wood <scottwood at freescale.com>
AuthorDate: Fri Nov 13 14:14:15 2009 -0600
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Nov 30 09:53:55 2009 +0000
mtd: eLBC NAND: give more verbose output on error
We want error information even if the kernel hasn't been built for verbose
debugging.
Signed-off-by: Scott Wood <scottwood at freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/fsl_elbc_nand.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 5b51ed3..ae30fb6 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -237,12 +237,15 @@ static int fsl_elbc_run_command(struct mtd_info *mtd)
ctrl->use_mdr = 0;
- dev_vdbg(ctrl->dev,
- "fsl_elbc_run_command: stat=%08x mdr=%08x fmr=%08x\n",
- ctrl->status, ctrl->mdr, in_be32(&lbc->fmr));
+ if (ctrl->status != LTESR_CC) {
+ dev_info(ctrl->dev,
+ "command failed: fir %x fcr %x status %x mdr %x\n",
+ in_be32(&lbc->fir), in_be32(&lbc->fcr),
+ ctrl->status, ctrl->mdr);
+ return -EIO;
+ }
- /* returns 0 on success otherwise non-zero) */
- return ctrl->status == LTESR_CC ? 0 : -EIO;
+ return 0;
}
static void fsl_elbc_do_read(struct nand_chip *chip, int oob)
More information about the linux-mtd-cvs
mailing list