RE: [PATCH v4 02/11] mtd: cfi_cmdset_0002: Remove chip_ready() from do_write_buffer()

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

 



Hi Przemyslaw-san and Jocke-san,

Sorry for the endless loop problem that was caused by my change.
As Boris-san mentioned I have just understood the problem and it looks that
it will be resolved by this change also.
Anyway I also will do try to fix by the change.

  Note: My old email address is not able to be used now.

Regards,
Ikegami

> -----Original Message-----
> From: Tokunori Ikegami [mailto:ikegami_to@xxxxxxxxxxx]
> Sent: Tuesday, February 5, 2019 3:28 AM
> To: 'Boris Brezillon'
> Cc: 'Boris Brezillon'; 'Joakim Tjernlund';
> 'linux-mtd@xxxxxxxxxxxxxxxxxxx'; 'Chris Packham'; 'Fabio Bettoni'
> Subject: RE: [PATCH v4 02/11] mtd: cfi_cmdset_0002: Remove chip_ready()
> from do_write_buffer()
> 
> Hi Boris-san,
> 
> Thank you so much for your quick reviewing.
> I see and will do that later.
> 
> > This patch actually fixes a bug (as reported in the other thread), so
> > please add Fixes and Cc-stable tags and explain why it might cause
> > an infinite loop in the commit message.
> 
> Regards,
> Ikegami
> 
> > -----Original Message-----
> > From: Boris Brezillon [mailto:bbrezillon@xxxxxxxxxx]
> > Sent: Tuesday, February 5, 2019 3:06 AM
> > To: Tokunori Ikegami
> > Cc: Boris Brezillon; Joakim Tjernlund; linux-mtd@xxxxxxxxxxxxxxxxxxx;
> > Chris Packham; Fabio Bettoni
> > Subject: Re: [PATCH v4 02/11] mtd: cfi_cmdset_0002: Remove chip_ready()
> > from do_write_buffer()
> >
> > On Tue,  5 Feb 2019 02:35:41 +0900
> > Tokunori Ikegami <ikegami_to@xxxxxxxxxxx> wrote:
> >
> > > It is enough to use chip_good() only so chip_ready() is not necessary.
> > > Since chip_good() is doing the same check chip_ready() is doing plus
> an
> > extra
> > > check to make sure we end up with the data we wrote.
> > >
> > > For this change the order to check timeout also will be changed at
same
> > time.
> > > The order is not a hard requirement, it's just better to avoid the
case
> > where
> > > the data update happens just after the timeout has expired.
> > >
> > > Signed-off-by: Tokunori Ikegami <ikegami_to@xxxxxxxxxxx>
> >
> > This patch actually fixes a bug (as reported in the other thread), so
> > please add Fixes and Cc-stable tags and explain why it might cause
> > an infinite loop in the commit message.
> >
> > > Cc: Fabio Bettoni <fbettoni@xxxxxxxxx>
> > > Co: Hauke Mehrtens <hauke@xxxxxxxxxx>
> > > Co: Koen Vandeputte <koen.vandeputte@xxxxxxxxxxxx>
> > > Cc: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> > > Cc: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx>
> > > Cc: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxxxxxxx>
> > > Cc: linux-mtd@xxxxxxxxxxxxxxxxxxx
> > > ---
> > > Changes since v3:
> > > - Update the commit message for the comment.
> > > - Change the email address of Tokunori Ikegami to
> ikegami_to@xxxxxxxxxxx.
> > >
> > > Changes since v2:
> > > - None.
> > >
> > > Changes since v1:
> > > - None.
> > >
> > >  drivers/mtd/chips/cfi_cmdset_0002.c | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
> > b/drivers/mtd/chips/cfi_cmdset_0002.c
> > > index 91a491b..ca9d5fa 100755
> > > --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> > > +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> > > @@ -1878,14 +1878,14 @@ static int __xipram do_write_buffer(struct
> > map_info *map, struct flchip *chip,
> > >  			continue;
> > >  		}
> > >
> > > -		if (time_after(jiffies, timeo) && !chip_ready(map, adr))
> > > -			break;
> > > -
> > >  		if (chip_good(map, adr, datum)) {
> > >  			xip_enable(map, chip, adr);
> > >  			goto op_done;
> > >  		}
> > >
> > > +		if (time_after(jiffies, timeo))
> > > +			break;
> > > +
> > >  		/* Latency issues. Drop the lock, wait a while and retry
> > */
> > >  		UDELAY(map, chip, adr, 1);
> > >  	}


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux