Re: ubifs error with marvell_nand on Armada-98DX4251 (was Re: [PATCH] mtd: rawnand: marvell: fix command xtype in BCH write hook)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

On 08/05/18 19:59, Boris Brezillon wrote:
> On Tue, 8 May 2018 01:38:13 +0000
> Chris Packham <Chris.Packham@xxxxxxxxxxxxxxxxxxx> wrote:
> 
>> Hi Boris,
>>
>> Thanks for picking this up while Miquel is taking a break.
> 
> Can you try with the following diff applied?
> 
> --->8---
> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> index db5ec4e8bde9..ebb1d141b900 100644
> --- a/drivers/mtd/nand/raw/marvell_nand.c
> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> @@ -1194,11 +1194,13 @@ static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
>                                    NDCB0_CMD2(NAND_CMD_READSTART);
>   
>          /*
> -        * Trigger the naked read operation only on the last chunk.
> -        * Otherwise, use monolithic read.
> +        * Trigger the monolithic read on the first chunk, then naked read on
> +        * intermediate chunks and finally a last naked read on the last chunk.
>           */
> -       if (lt->nchunks == 1 || (chunk < lt->nchunks - 1))
> +       if (chunk == 0)
>                  nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +       else if (chunk < lt->nchunks - 1)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
>          else
>                  nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
>   
> 

Tested-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>

Works for:

Armada-385 + Micron MT29F8G08ABACAWP
Armada-385 + Micron MT29F2G08ABAEAWP
Armada-385 + Macronix MX30LF2G18AC
Armada-98DX4251 + Micron MT29F8G08ABACAWP (previously failed)
Armada-98DX3236 + AMD/Spansion S34ML01G2
Armada-98DX3236 + Macronix MX30LF1G18AC






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux