mbox series

[4.19.113,0/3] Fix for long operation cmds busy detection

Message ID 1587150844-12003-1-git-send-email-skomatineni@nvidia.com (mailing list archive)
Headers show
Series Fix for long operation cmds busy detection | expand

Message

Sowjanya Komatineni April 17, 2020, 7:14 p.m. UTC
This series includes manually backported changes that implements Tegra
specific timeout callback to switch between finite and infinite HW busy
detection wait modes.

sdhci-tegra driver patch implements set_timeout callback based on one of
the sdhci host driver patch that refactors sdhci_set_timeout and allows
drivers to call __sdhci_set_timeout with their timeout callback
implementation.

Both of these patches are manually backported in this series.


Sowjanya Komatineni (3):
  mmc: sdhci: Refactor sdhci_set_timeout()
  sdhci: tegra: Implement Tegra specific set_timeout callback
  sdhci: tegra: Enable MMC_CAP_WAIT_WHILE_BUSY host capability

 drivers/mmc/host/sdhci-tegra.c | 32 ++++++++++++++++++++++++++++++++
 drivers/mmc/host/sdhci.c       | 38 ++++++++++++++++++++------------------
 drivers/mmc/host/sdhci.h       |  1 +
 3 files changed, 53 insertions(+), 18 deletions(-)

Comments

Greg KH April 19, 2020, 7:20 a.m. UTC | #1
On Fri, Apr 17, 2020 at 12:14:01PM -0700, Sowjanya Komatineni wrote:
> This series includes manually backported changes that implements Tegra
> specific timeout callback to switch between finite and infinite HW busy
> detection wait modes.
> 
> sdhci-tegra driver patch implements set_timeout callback based on one of
> the sdhci host driver patch that refactors sdhci_set_timeout and allows
> drivers to call __sdhci_set_timeout with their timeout callback
> implementation.
> 
> Both of these patches are manually backported in this series.

Is this a bugfix or a new feature?  I can't tell, but it feels like it's
a new feature.  What's wrong with just using the 5.4.y kernel tree?

thanks,

greg k-h
Sowjanya Komatineni April 19, 2020, 4:23 p.m. UTC | #2
On 4/19/20 12:20 AM, Greg KH wrote:
> External email: Use caution opening links or attachments
>
>
> On Fri, Apr 17, 2020 at 12:14:01PM -0700, Sowjanya Komatineni wrote:
>> This series includes manually backported changes that implements Tegra
>> specific timeout callback to switch between finite and infinite HW busy
>> detection wait modes.
>>
>> sdhci-tegra driver patch implements set_timeout callback based on one of
>> the sdhci host driver patch that refactors sdhci_set_timeout and allows
>> drivers to call __sdhci_set_timeout with their timeout callback
>> implementation.
>>
>> Both of these patches are manually backported in this series.
> Is this a bugfix or a new feature?  I can't tell, but it feels like it's
> a new feature.  What's wrong with just using the 5.4.y kernel tree?
>
> thanks,
>
> greg k-h
Ulf recent patches for increased timeout adds capability 
MMC_CAP_NEED_RSP_BUSY for sdhci-tegra as well.

So, it will always use R1B for R1B type commands so there are no known 
bugs or failures with mmc devices we use on our platforms.

So, we can treat this patch as an improvement for long operation 
commands where HW will wait as long as device is busy.

Yes, should be fine to have this from 5.4.y

For 5.4.y and 5.5.y, we can back-port same patch that was applied to 5.6.y

Will send back-port request of that..

Thanks

Sowjanya
Greg KH April 19, 2020, 4:52 p.m. UTC | #3
On Sun, Apr 19, 2020 at 09:23:39AM -0700, Sowjanya Komatineni wrote:
> 
> On 4/19/20 12:20 AM, Greg KH wrote:
> > External email: Use caution opening links or attachments
> > 
> > 
> > On Fri, Apr 17, 2020 at 12:14:01PM -0700, Sowjanya Komatineni wrote:
> > > This series includes manually backported changes that implements Tegra
> > > specific timeout callback to switch between finite and infinite HW busy
> > > detection wait modes.
> > > 
> > > sdhci-tegra driver patch implements set_timeout callback based on one of
> > > the sdhci host driver patch that refactors sdhci_set_timeout and allows
> > > drivers to call __sdhci_set_timeout with their timeout callback
> > > implementation.
> > > 
> > > Both of these patches are manually backported in this series.
> > Is this a bugfix or a new feature?  I can't tell, but it feels like it's
> > a new feature.  What's wrong with just using the 5.4.y kernel tree?
> > 
> > thanks,
> > 
> > greg k-h
> Ulf recent patches for increased timeout adds capability
> MMC_CAP_NEED_RSP_BUSY for sdhci-tegra as well.
> 
> So, it will always use R1B for R1B type commands so there are no known bugs
> or failures with mmc devices we use on our platforms.

I have no idea what this means, sorry.

> So, we can treat this patch as an improvement for long operation commands
> where HW will wait as long as device is busy.

Ok, so this isn't a regression and can't match the stable kernel rules,
sorry.

greg k-h
Ulf Hansson April 20, 2020, 7:01 a.m. UTC | #4
On Sun, 19 Apr 2020 at 18:52, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Sun, Apr 19, 2020 at 09:23:39AM -0700, Sowjanya Komatineni wrote:
> >
> > On 4/19/20 12:20 AM, Greg KH wrote:
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > On Fri, Apr 17, 2020 at 12:14:01PM -0700, Sowjanya Komatineni wrote:
> > > > This series includes manually backported changes that implements Tegra
> > > > specific timeout callback to switch between finite and infinite HW busy
> > > > detection wait modes.
> > > >
> > > > sdhci-tegra driver patch implements set_timeout callback based on one of
> > > > the sdhci host driver patch that refactors sdhci_set_timeout and allows
> > > > drivers to call __sdhci_set_timeout with their timeout callback
> > > > implementation.
> > > >
> > > > Both of these patches are manually backported in this series.
> > > Is this a bugfix or a new feature?  I can't tell, but it feels like it's
> > > a new feature.  What's wrong with just using the 5.4.y kernel tree?
> > >
> > > thanks,
> > >
> > > greg k-h
> > Ulf recent patches for increased timeout adds capability
> > MMC_CAP_NEED_RSP_BUSY for sdhci-tegra as well.
> >
> > So, it will always use R1B for R1B type commands so there are no known bugs
> > or failures with mmc devices we use on our platforms.
>
> I have no idea what this means, sorry.
>
> > So, we can treat this patch as an improvement for long operation commands
> > where HW will wait as long as device is busy.
>
> Ok, so this isn't a regression and can't match the stable kernel rules,
> sorry.

Let me help to clarify. This isn't a regression, correct. However, the
patch fixes a long outstanding bug for sdhci-tegra.

For some SD/MMC commands, the mmc core may provide a long busy timeout
trusting the mmc host to cope with it. It has turned out that
sdhci-tegra didn't, thus it may report a cmd-timeout error, while in
fact it shouldn't.

I believe that is what the small series of patches should be addressing.

Kind regards
Uffe
Sowjanya Komatineni April 21, 2020, 5:04 p.m. UTC | #5
On 4/20/20 12:01 AM, Ulf Hansson wrote:
> External email: Use caution opening links or attachments
>
>
> On Sun, 19 Apr 2020 at 18:52, Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Sun, Apr 19, 2020 at 09:23:39AM -0700, Sowjanya Komatineni wrote:
>>> On 4/19/20 12:20 AM, Greg KH wrote:
>>>> External email: Use caution opening links or attachments
>>>>
>>>>
>>>> On Fri, Apr 17, 2020 at 12:14:01PM -0700, Sowjanya Komatineni wrote:
>>>>> This series includes manually backported changes that implements Tegra
>>>>> specific timeout callback to switch between finite and infinite HW busy
>>>>> detection wait modes.
>>>>>
>>>>> sdhci-tegra driver patch implements set_timeout callback based on one of
>>>>> the sdhci host driver patch that refactors sdhci_set_timeout and allows
>>>>> drivers to call __sdhci_set_timeout with their timeout callback
>>>>> implementation.
>>>>>
>>>>> Both of these patches are manually backported in this series.
>>>> Is this a bugfix or a new feature?  I can't tell, but it feels like it's
>>>> a new feature.  What's wrong with just using the 5.4.y kernel tree?
>>>>
>>>> thanks,
>>>>
>>>> greg k-h
>>> Ulf recent patches for increased timeout adds capability
>>> MMC_CAP_NEED_RSP_BUSY for sdhci-tegra as well.
>>>
>>> So, it will always use R1B for R1B type commands so there are no known bugs
>>> or failures with mmc devices we use on our platforms.
>> I have no idea what this means, sorry.
>>
>>> So, we can treat this patch as an improvement for long operation commands
>>> where HW will wait as long as device is busy.
>> Ok, so this isn't a regression and can't match the stable kernel rules,
>> sorry.
> Let me help to clarify. This isn't a regression, correct. However, the
> patch fixes a long outstanding bug for sdhci-tegra.
>
> For some SD/MMC commands, the mmc core may provide a long busy timeout
> trusting the mmc host to cope with it. It has turned out that
> sdhci-tegra didn't, thus it may report a cmd-timeout error, while in
> fact it shouldn't.
>
> I believe that is what the small series of patches should be addressing.
>
> Kind regards
> Uffe

Hi Greg,

Yes, we we don't have failure as of today with mmc devices we are using 
on our platforms.

But this is something thats missing from the beginning to handle 
commands that takes longer than max host timeout and it may fail if any 
operation takes more than max host timeout limit.

So, can we please have this applied to 4.19.113? I will also send 
patches to backport for 5.4 and 5.5?

Thanks

Sowjanya