[RFC PATCH v2 1/6] mtd: nand: provide several helpers to do common NAND operations

Miquel RAYNAL miquel.raynal at free-electrons.com
Thu Nov 30 05:48:39 PST 2017


Hi Sean, Boris,

> >> Theoretically, there could be three cases:
> >>   [1] INTR__ERASE_COMP interrupt is asserted
> >>   [2] INTR__ERASE_FAIL interrupt is asserted
> >>   [3] Nothing is asserted (bailout by timeout)  
> >
> > Well, ideally we should have something like:
> >
> >         if (irq_status & INTR__ERASE_COMP)
> >                 return 0;
> >         else if (irq_status & INTR__ERASE_FAIL)
> >                 return -EIO;
> >
> >         return -ETIMEDOUT;
> >
> > But let's keep the existing behavior (return -EIO in case of
> > timeout). 
> 
> 
> I agree with this change,
> but it should also be done in a separate work.
> 
> 

Ok, I will stick to Boris' first solution and put this aside.

Patches will come very soon.

Thank you both,
Miquèl



More information about the linux-mtd mailing list