* [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
@ 2011-06-13 2:23 Shaohui Xie
2011-06-17 17:58 ` Bryan Hundven
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Shaohui Xie @ 2011-06-13 2:23 UTC (permalink / raw)
To: linuxppc-dev; +Cc: scottwood, linux-mtd, Shaohui Xie
when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5,
but the driver only read 5 bytes, so kernel will dump error messages like:
fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: Scott Wood <scottwood@freescale.com>
---
drivers/mtd/nand/fsl_elbc_nand.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 0bb254c..33d8aad 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -339,9 +339,9 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
(FIR_OP_UA << FIR_OP1_SHIFT) |
(FIR_OP_RBW << FIR_OP2_SHIFT));
out_be32(&lbc->fcr, NAND_CMD_READID << FCR_CMD0_SHIFT);
- /* 5 bytes for manuf, device and exts */
- out_be32(&lbc->fbcr, 5);
- elbc_fcm_ctrl->read_bytes = 5;
+ /* nand_get_flash_type() reads 8 bytes of entire ID string */
+ out_be32(&lbc->fbcr, 8);
+ elbc_fcm_ctrl->read_bytes = 8;
elbc_fcm_ctrl->use_mdr = 1;
elbc_fcm_ctrl->mdr = 0;
--
1.6.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
2011-06-13 2:23 [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number Shaohui Xie
@ 2011-06-17 17:58 ` Bryan Hundven
2011-06-22 5:32 ` Artem Bityutskiy
2011-06-22 11:08 ` Kumar Gala
2 siblings, 0 replies; 6+ messages in thread
From: Bryan Hundven @ 2011-06-17 17:58 UTC (permalink / raw)
To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
On Sun, Jun 12, 2011 at 7:23 PM, Shaohui Xie <Shaohui.Xie@freescale.com> wr=
ote:
> when nand_get_flash_type() is called, it will read 8 bytes of ID instead =
of 5,
> but the driver only read 5 bytes, so kernel will dump error messages like=
:
>
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
> =C2=A0drivers/mtd/nand/fsl_elbc_nand.c | =C2=A0 =C2=A06 +++---
> =C2=A01 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc=
_nand.c
> index 0bb254c..33d8aad 100644
> --- a/drivers/mtd/nand/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -339,9 +339,9 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, un=
signed int command,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(FIR_OP_UA =C2=A0<< FIR=
_OP1_SHIFT) |
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(FIR_OP_RBW << FIR_OP2_=
SHIFT));
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0out_be32(&lbc->fcr=
, NAND_CMD_READID << FCR_CMD0_SHIFT);
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* 5 bytes for manuf, =
device and exts */
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&lbc->fbcr, 5=
);
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 elbc_fcm_ctrl->read_by=
tes =3D 5;
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* nand_get_flash_type=
() reads 8 bytes of entire ID string */
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 out_be32(&lbc->fbcr, 8=
);
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 elbc_fcm_ctrl->read_by=
tes =3D 8;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0elbc_fcm_ctrl->use=
_mdr =3D 1;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0elbc_fcm_ctrl->mdr=
=3D 0;
>
> --
> 1.6.4
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
Shaohui,
I have tested this on p1011rdb, p1020rdb, and p2020rdb on 2.6.35.13
and 2.6.39.1.
Thank you for fixing this :-)
-Bryan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
@ 2011-06-17 17:58 ` Bryan Hundven
0 siblings, 0 replies; 6+ messages in thread
From: Bryan Hundven @ 2011-06-17 17:58 UTC (permalink / raw)
To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
On Sun, Jun 12, 2011 at 7:23 PM, Shaohui Xie <Shaohui.Xie@freescale.com> wrote:
> when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5,
> but the driver only read 5 bytes, so kernel will dump error messages like:
>
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/fsl_elbc_nand.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
> index 0bb254c..33d8aad 100644
> --- a/drivers/mtd/nand/fsl_elbc_nand.c
> +++ b/drivers/mtd/nand/fsl_elbc_nand.c
> @@ -339,9 +339,9 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
> (FIR_OP_UA << FIR_OP1_SHIFT) |
> (FIR_OP_RBW << FIR_OP2_SHIFT));
> out_be32(&lbc->fcr, NAND_CMD_READID << FCR_CMD0_SHIFT);
> - /* 5 bytes for manuf, device and exts */
> - out_be32(&lbc->fbcr, 5);
> - elbc_fcm_ctrl->read_bytes = 5;
> + /* nand_get_flash_type() reads 8 bytes of entire ID string */
> + out_be32(&lbc->fbcr, 8);
> + elbc_fcm_ctrl->read_bytes = 8;
> elbc_fcm_ctrl->use_mdr = 1;
> elbc_fcm_ctrl->mdr = 0;
>
> --
> 1.6.4
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
Shaohui,
I have tested this on p1011rdb, p1020rdb, and p2020rdb on 2.6.35.13
and 2.6.39.1.
Thank you for fixing this :-)
-Bryan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
2011-06-13 2:23 [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number Shaohui Xie
2011-06-17 17:58 ` Bryan Hundven
@ 2011-06-22 5:32 ` Artem Bityutskiy
2011-06-22 11:08 ` Kumar Gala
2 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2011-06-22 5:32 UTC (permalink / raw)
To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
On Mon, 2011-06-13 at 10:23 +0800, Shaohui Xie wrote:
> when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5,
> but the driver only read 5 bytes, so kernel will dump error messages like:
>
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>
Thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
2011-06-13 2:23 [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number Shaohui Xie
@ 2011-06-22 11:08 ` Kumar Gala
2011-06-22 5:32 ` Artem Bityutskiy
2011-06-22 11:08 ` Kumar Gala
2 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2011-06-22 11:08 UTC (permalink / raw)
To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
On Jun 12, 2011, at 9:23 PM, Shaohui Xie wrote:
> when nand_get_flash_type() is called, it will read 8 bytes of ID =
instead of 5,
> but the driver only read 5 bytes, so kernel will dump error messages =
like:
>=20
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>=20
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/fsl_elbc_nand.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
applied to merge
- k=
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number
@ 2011-06-22 11:08 ` Kumar Gala
0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2011-06-22 11:08 UTC (permalink / raw)
To: Shaohui Xie; +Cc: scottwood, linux-mtd, linuxppc-dev
On Jun 12, 2011, at 9:23 PM, Shaohui Xie wrote:
> when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5,
> but the driver only read 5 bytes, so kernel will dump error messages like:
>
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
> fsl-lbc ffe124000.localbus: read_byte beyond end of buffer
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/mtd/nand/fsl_elbc_nand.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
applied to merge
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-22 11:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-13 2:23 [PATCH] powerpc/85xx: fix NAND_CMD_READID read bytes number Shaohui Xie
2011-06-17 17:58 ` Bryan Hundven
2011-06-17 17:58 ` Bryan Hundven
2011-06-22 5:32 ` Artem Bityutskiy
2011-06-22 11:08 ` Kumar Gala
2011-06-22 11:08 ` Kumar Gala
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.