Re: [U-Boot] [PATCH 2/8] spl: nand: sunxi: Fix second case of modulo by zero error

2018-01-24 Thread Miquel Raynal
Hi Maxime, On Wed, 24 Jan 2018 08:47:31 +0100 Maxime Ripard wrote: > On Wed, Jan 24, 2018 at 01:44:48AM +0100, Miquel Raynal wrote: > > In the nand_read_buffer() step, the seed is calculated by doing a modulo > > by conf->nseeds which is always zero when not

Re: [U-Boot] [PATCH 2/8] spl: nand: sunxi: Fix second case of modulo by zero error

2018-01-23 Thread Maxime Ripard
On Wed, Jan 24, 2018 at 01:44:48AM +0100, Miquel Raynal wrote: > In the nand_read_buffer() step, the seed is calculated by doing a modulo > by conf->nseeds which is always zero when not using the randomizer (most > of SLC NANDs). > > This situation turns out to lead to a run time freeze. > >

[U-Boot] [PATCH 2/8] spl: nand: sunxi: Fix second case of modulo by zero error

2018-01-23 Thread Miquel Raynal
In the nand_read_buffer() step, the seed is calculated by doing a modulo by conf->nseeds which is always zero when not using the randomizer (most of SLC NANDs). This situation turns out to lead to a run time freeze. Derive this seed only when the randomizer is enabled (and conf->nseeds logically