All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Nyekjaer <sean@geanix.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Han Xu <han.xu@nxp.com>,
	richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] mtd: nand: raw: gpmi: new bch geometry settings
Date: Mon, 5 Jul 2021 12:46:54 +0200	[thread overview]
Message-ID: <20210705104654.gko7ettkilrrosi7@skn-laptop> (raw)
In-Reply-To: <20210526173123.1787713b@xps13>

On Wed, May 26, 2021 at 05:31:23PM +0200, Miquel Raynal wrote:
> Hi Han,
> 

[ ... ]

> 
> I understand that (2) might be ideal to meet but is breaking all the
> boards that use this driver really worth the trouble?
> 
> Short answer: no. So we need to adapt the calculation for new
> boards/new flash chips/certain geometries at most.
> 
> > > > The new implementation might get weak ecc than legacy way in some cases but it
> > > > is safety guaranteed.  
> > > 
> > > What does "safety guaranteed" means?  
> > 
> > set minimum ecc required by nand chip at least meet all requirements
> > 
> > >   
> > > > This reminds me the gpmi raw access mode changes in kernel 3.19, it also changes
> > > > the driver behaviors and makes totally different output compared with older
> > > > versions. I know changes bring mess but we have to accept it at some point
> > > > rather than keep compromising to the wrong way.  
> > > 
> > > How is this an argument? I am usually in favor of moving forward when
> > > there is a real justification, but this does not seem the case, unless
> > > I am understanding it all the wrong way.
> > >   
> > > > The change has been in NXP kernel fork for a while, so quite a few customers are
> > > > using this bch geometry settings. I hope it can be upstreamed, any other things
> > > > I can do may mitigate the imapact?  
> > > 
> > > You are well aware of the upstreaming process, trying to merge
> > > something locally, making it used and then complaining because not
> > > upstreaming it would break your customers really is your own
> > > responsibility.  
> > 
> > Sorry I understand I should try upstreaming it early, so I am still looking for
> > a chance to avoid further divergence.
> > 
> > > 
> > > IMHO the solutions are:
> > > - the current (mainline) default will remain the standard for
> > >   geometries which are already widely supported
> > > - if there are new geometries that must be supported and do not fit
> > >   because of the "legacy" logic, then you may detect that and try
> > >   to fallback to the "modern" way of calculating the ECC
> > >   parameters (or even jump directly to the modern way if the geometry
> > >   really is not currently supported officially)
> > > - if your customers want a specific chunk size/strength when
> > >   rebasing on top of a mainline kernel there are DT properties which do
> > >   that anyway
> > > - follow Sean advice: introduce a property requesting to use the
> > >   'modern' or 'legacy' logic (with a better name than modern) but first
> > >   check with Rob that this if valid.
> 
> Another hint: please check the core helpers and use them instead of
> trying to re-invent the wheel: normally just describing the engine
> capabilities and calling a single helper should do the trick. But this
> 'new' calculation should only apply to eg. MLC devices or devices with
> specific geometries, not to all devices.
> 
> Thanks,
> Miquèl

Hi Han,

Is this something you are working on?
If not I really think we need to revert the changes to u-boot, to allign
vanilla u-boot and kernel.

/Sean

WARNING: multiple messages have this Message-ID (diff)
From: Sean Nyekjaer <sean@geanix.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Han Xu <han.xu@nxp.com>,
	richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] mtd: nand: raw: gpmi: new bch geometry settings
Date: Mon, 5 Jul 2021 12:46:54 +0200	[thread overview]
Message-ID: <20210705104654.gko7ettkilrrosi7@skn-laptop> (raw)
In-Reply-To: <20210526173123.1787713b@xps13>

On Wed, May 26, 2021 at 05:31:23PM +0200, Miquel Raynal wrote:
> Hi Han,
> 

[ ... ]

> 
> I understand that (2) might be ideal to meet but is breaking all the
> boards that use this driver really worth the trouble?
> 
> Short answer: no. So we need to adapt the calculation for new
> boards/new flash chips/certain geometries at most.
> 
> > > > The new implementation might get weak ecc than legacy way in some cases but it
> > > > is safety guaranteed.  
> > > 
> > > What does "safety guaranteed" means?  
> > 
> > set minimum ecc required by nand chip at least meet all requirements
> > 
> > >   
> > > > This reminds me the gpmi raw access mode changes in kernel 3.19, it also changes
> > > > the driver behaviors and makes totally different output compared with older
> > > > versions. I know changes bring mess but we have to accept it at some point
> > > > rather than keep compromising to the wrong way.  
> > > 
> > > How is this an argument? I am usually in favor of moving forward when
> > > there is a real justification, but this does not seem the case, unless
> > > I am understanding it all the wrong way.
> > >   
> > > > The change has been in NXP kernel fork for a while, so quite a few customers are
> > > > using this bch geometry settings. I hope it can be upstreamed, any other things
> > > > I can do may mitigate the imapact?  
> > > 
> > > You are well aware of the upstreaming process, trying to merge
> > > something locally, making it used and then complaining because not
> > > upstreaming it would break your customers really is your own
> > > responsibility.  
> > 
> > Sorry I understand I should try upstreaming it early, so I am still looking for
> > a chance to avoid further divergence.
> > 
> > > 
> > > IMHO the solutions are:
> > > - the current (mainline) default will remain the standard for
> > >   geometries which are already widely supported
> > > - if there are new geometries that must be supported and do not fit
> > >   because of the "legacy" logic, then you may detect that and try
> > >   to fallback to the "modern" way of calculating the ECC
> > >   parameters (or even jump directly to the modern way if the geometry
> > >   really is not currently supported officially)
> > > - if your customers want a specific chunk size/strength when
> > >   rebasing on top of a mainline kernel there are DT properties which do
> > >   that anyway
> > > - follow Sean advice: introduce a property requesting to use the
> > >   'modern' or 'legacy' logic (with a better name than modern) but first
> > >   check with Rob that this if valid.
> 
> Another hint: please check the core helpers and use them instead of
> trying to re-invent the wheel: normally just describing the engine
> capabilities and calling a single helper should do the trick. But this
> 'new' calculation should only apply to eg. MLC devices or devices with
> specific geometries, not to all devices.
> 
> Thanks,
> Miquèl

Hi Han,

Is this something you are working on?
If not I really think we need to revert the changes to u-boot, to allign
vanilla u-boot and kernel.

/Sean

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

  reply	other threads:[~2021-07-05 10:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 20:51 [PATCH 1/2] mtd: nand: raw: gpmi: new bch geometry settings Han Xu
2021-05-22 20:51 ` Han Xu
2021-05-22 20:51 ` [PATCH 2/2] dt-bindings: mtd: gpmi-nand: add new fsl,legacy-bch-geometry flag Han Xu
2021-05-22 20:51   ` [PATCH 2/2] dt-bindings: mtd: gpmi-nand: add new fsl, legacy-bch-geometry flag Han Xu
2021-05-23 17:44 ` [PATCH 1/2] mtd: nand: raw: gpmi: new bch geometry settings Sean Nyekjaer
2021-05-23 17:44   ` Sean Nyekjaer
2021-05-25 19:13   ` Han Xu
2021-05-25 19:13     ` Han Xu
2021-05-26  7:41     ` Miquel Raynal
2021-05-26  7:41       ` Miquel Raynal
2021-05-26 14:17       ` Han Xu
2021-05-26 14:17         ` Han Xu
2021-05-26 15:31         ` Miquel Raynal
2021-05-26 15:31           ` Miquel Raynal
2021-07-05 10:46           ` Sean Nyekjaer [this message]
2021-07-05 10:46             ` Sean Nyekjaer
2021-07-06  2:50             ` Han Xu
2021-07-06  2:50               ` Han Xu
2021-10-12  9:15               ` Sean Nyekjaer
2021-10-15  7:44                 ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210705104654.gko7ettkilrrosi7@skn-laptop \
    --to=sean@geanix.com \
    --cc=devicetree@vger.kernel.org \
    --cc=han.xu@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.