Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
On Wed, Dec 02, 2015 at 10:08:20PM +0100, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris > wrote: > > If that's really an issue (i.e., we have an implementation + data), I'm > > sure we could add optimization to nand_check_erased_ecc_chunk() to > > support the

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Simon Arlott
On 02/12/15 21:08, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris > wrote: >> >> BTW, I think Kamal had code to handle protecting bitflips in erased >> pages code in the Broadcom STB Linux BSP. Perhaps he can port that to >> upstream with nand_check_erased_ecc_chunk()? IIUC,

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Jonas Gorski
Hi, On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris wrote: > Hi, > > On Wed, Dec 02, 2015 at 09:44:04PM +0100, Jonas Gorski wrote: >> On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: >> > On 01/12/15 10:41, Jonas Gorski wrote: >> >> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: >> >>> +

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
On Wed, Dec 02, 2015 at 12:54:15PM -0800, Brian Norris wrote: > BTW, I think Kamal had code to handle protecting bitflips in erased > pages code in the Broadcom STB Linux BSP. Perhaps he can port that to > upstream with nand_check_erased_ecc_chunk()? IIUC, that would probably > handle your case

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
Hi, On Wed, Dec 02, 2015 at 09:44:04PM +0100, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: > > On 01/12/15 10:41, Jonas Gorski wrote: > >> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: > >>> + > >>> + /* Go to start of buffer */ > >>> + buf -=

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Jonas Gorski
On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: > On 01/12/15 10:41, Jonas Gorski wrote: >> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: >>> + >>> + /* Go to start of buffer */ >>> + buf -= FC_WORDS; >>> + >>> + /* Erased if all data bytes are 0xFF */ >>> +

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Simon Arlott
On 01/12/15 10:41, Jonas Gorski wrote: > On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: >> + >> + /* Go to start of buffer */ >> + buf -= FC_WORDS; >> + >> + /* Erased if all data bytes are 0xFF */ >> + buf_erased = memchr_inv(buf, 0xFF, FC_WORDS) == NULL; >> + >> +

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Simon Arlott
On 01/12/15 10:41, Jonas Gorski wrote: > On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: >> + >> + /* Go to start of buffer */ >> + buf -= FC_WORDS; >> + >> + /* Erased if all data bytes are 0xFF */ >> + buf_erased = memchr_inv(buf, 0xFF, FC_WORDS)

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Jonas Gorski
On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: > On 01/12/15 10:41, Jonas Gorski wrote: >> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: >>> + >>> + /* Go to start of buffer */ >>> + buf -= FC_WORDS; >>> + >>> + /* Erased if all

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
Hi, On Wed, Dec 02, 2015 at 09:44:04PM +0100, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: > > On 01/12/15 10:41, Jonas Gorski wrote: > >> On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: > >>> + > >>> + /* Go to start

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
On Wed, Dec 02, 2015 at 10:08:20PM +0100, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris > wrote: > > If that's really an issue (i.e., we have an implementation + data), I'm > > sure we could add optimization to nand_check_erased_ecc_chunk() to > >

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Jonas Gorski
Hi, On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris wrote: > Hi, > > On Wed, Dec 02, 2015 at 09:44:04PM +0100, Jonas Gorski wrote: >> On Wed, Dec 2, 2015 at 9:17 PM, Simon Arlott wrote: >> > On 01/12/15 10:41, Jonas Gorski wrote: >> >> On Sat, Nov

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Brian Norris
On Wed, Dec 02, 2015 at 12:54:15PM -0800, Brian Norris wrote: > BTW, I think Kamal had code to handle protecting bitflips in erased > pages code in the Broadcom STB Linux BSP. Perhaps he can port that to > upstream with nand_check_erased_ecc_chunk()? IIUC, that would probably > handle your case

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-02 Thread Simon Arlott
On 02/12/15 21:08, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris > wrote: >> >> BTW, I think Kamal had code to handle protecting bitflips in erased >> pages code in the Broadcom STB Linux BSP. Perhaps he can port that to >> upstream with

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-01 Thread Jonas Gorski
Hi, On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: > Workaround false ECC uncorrectable errors by checking if the data > has been erased and the OOB data indicates that the data has been > erased. The v4.0 controller on the BCM63168 incorrectly handles > these as uncorrectable errors. > >

Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-12-01 Thread Jonas Gorski
Hi, On Sat, Nov 28, 2015 at 8:23 PM, Simon Arlott wrote: > Workaround false ECC uncorrectable errors by checking if the data > has been erased and the OOB data indicates that the data has been > erased. The v4.0 controller on the BCM63168 incorrectly handles > these as

[PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-11-28 Thread Simon Arlott
Workaround false ECC uncorrectable errors by checking if the data has been erased and the OOB data indicates that the data has been erased. The v4.0 controller on the BCM63168 incorrectly handles these as uncorrectable errors. I don't know which version of the controller handles this scenario

[PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors

2015-11-28 Thread Simon Arlott
Workaround false ECC uncorrectable errors by checking if the data has been erased and the OOB data indicates that the data has been erased. The v4.0 controller on the BCM63168 incorrectly handles these as uncorrectable errors. I don't know which version of the controller handles this scenario