All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
To: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"Evgeniy.Didin@synopsys.com" <Evgeniy.Didin@synopsys.com>
Cc: "shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>,
	"Alexey.Brodkin@synopsys.com" <Alexey.Brodkin@synopsys.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"Jisheng.Zhang@synaptics.com" <Jisheng.Zhang@synaptics.com>,
	"jh80.chung@samsung.com" <jh80.chung@samsung.com>,
	"andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	"Eugeniy.Paltsev@synopsys.com" <Eugeniy.Paltsev@synopsys.com>
Subject: Re: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs
Date: Thu, 15 Mar 2018 17:24:09 +0000	[thread overview]
Message-ID: <1521134649.10304.7.camel@synopsys.com> (raw)
In-Reply-To: <CAPDyKFp--bHg8PH7om7TTY15m0CRw3i4eO1=StRnVofxnf50OQ@mail.gmail.com>

On Thu, 2018-03-15 at 14:39 +0100, Ulf Hansson wrote:
> On 15 March 2018 at 14:18, Evgeniy Didin <Evgeniy.Didin@synopsys.com> wrote:
> > Hello Ulf,
> > 
> > On Thu, 2018-03-15 at 10:57 +0100, Ulf Hansson wrote:
> > > On 14 March 2018 at 20:30, Evgeniy Didin <Evgeniy.Didin@synopsys.com> wrote:
> > > > It was found that in IDMAC mode after soft-reset driver switches
> > > > to PIO mode.
> > > > 
> > > > That's what happens in case of DTO timeout overflow calculation failure:
> > > > 1. soft-reset is called
> > > > 2. driver restarts dma
> > > > 3. descriptors states are checked, one of descriptor is owned by the IDMAC.
> > > > 4. driver can't use DMA and then switches to PIO mode.
> > > > 
> > > > Failure was already fixed in:
> > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.spinics.net_lists_linux-2Dmmc_msg48125.html&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=vQk-RIbjwN0zvlwiMSpq3LYUTNf7Gqc4ujh
> > > > osYI
> > > > TtAw&m=6rPWpKUYQD3kY-2OEikJUWyEJvwKJljWHFC8rd2TCak&s=JjX0Dx8-eSyW2cATMsnG1eAzrKgoDkS1bcS5XYrVtlE&e=.
> > > 
> > > Evgeniy,
> > > 
> > > It seems like I should squash this fix into the above commit? Makes sense?
> > 
> > IMHO it is not a good idea, because this fix is orthogonal to the above commit.
> > Debugging drto overflow issue we found this strange behavior.
> 
> Okay! Thanks for clarifying.
> 
> > This might be general issue of soft-reset. So I think this should be separate patch.
> > Also if these patches are independent, it will be easier to backport them.
> 
> Should I add a stable tag then?

Sure. The issue can happen since v3.17, because starting with this version function dw_mci_reset was implemented.
Commit 3a33a94ce270 ("mmc: dw_mmc: change to use recommended reset procedure").

Best regards,
Evgeniy Didin

WARNING: multiple messages have this Message-ID (diff)
From: Evgeniy.Didin@synopsys.com (Evgeniy Didin)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs
Date: Thu, 15 Mar 2018 17:24:09 +0000	[thread overview]
Message-ID: <1521134649.10304.7.camel@synopsys.com> (raw)
In-Reply-To: <CAPDyKFp--bHg8PH7om7TTY15m0CRw3i4eO1=StRnVofxnf50OQ@mail.gmail.com>

On Thu, 2018-03-15@14:39 +0100, Ulf Hansson wrote:
> On 15 March 2018@14:18, Evgeniy Didin <Evgeniy.Didin@synopsys.com> wrote:
> > Hello Ulf,
> > 
> > On Thu, 2018-03-15@10:57 +0100, Ulf Hansson wrote:
> > > On 14 March 2018@20:30, Evgeniy Didin <Evgeniy.Didin@synopsys.com> wrote:
> > > > It was found that in IDMAC mode after soft-reset driver switches
> > > > to PIO mode.
> > > > 
> > > > That's what happens in case of DTO timeout overflow calculation failure:
> > > > 1. soft-reset is called
> > > > 2. driver restarts dma
> > > > 3. descriptors states are checked, one of descriptor is owned by the IDMAC.
> > > > 4. driver can't use DMA and then switches to PIO mode.
> > > > 
> > > > Failure was already fixed in:
> > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.spinics.net_lists_linux-2Dmmc_msg48125.html&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=vQk-RIbjwN0zvlwiMSpq3LYUTNf7Gqc4ujh
> > > > osYI
> > > > TtAw&m=6rPWpKUYQD3kY-2OEikJUWyEJvwKJljWHFC8rd2TCak&s=JjX0Dx8-eSyW2cATMsnG1eAzrKgoDkS1bcS5XYrVtlE&e=.
> > > 
> > > Evgeniy,
> > > 
> > > It seems like I should squash this fix into the above commit? Makes sense?
> > 
> > IMHO it is not a good idea, because this fix is orthogonal to the above commit.
> > Debugging drto overflow issue we found this strange behavior.
> 
> Okay! Thanks for clarifying.
> 
> > This might be general issue of soft-reset. So I think this should be separate patch.
> > Also if these patches are independent, it will be easier to backport them.
> 
> Should I add a stable tag then?

Sure. The issue can happen since v3.17, because starting with this version function dw_mci_reset was implemented.
Commit 3a33a94ce270 ("mmc: dw_mmc: change to use recommended reset procedure").

Best regards,
Evgeniy Didin

  reply	other threads:[~2018-03-15 17:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 19:30 [PATCH] mmc: dw_mmc: fix falling from idmac to PIO mode when dw_mci_reset occurs Evgeniy Didin
2018-03-14 19:30 ` Evgeniy Didin
2018-03-15  9:57 ` Ulf Hansson
2018-03-15  9:57   ` Ulf Hansson
2018-03-15 13:18   ` Evgeniy Didin
2018-03-15 13:18     ` Evgeniy Didin
2018-03-15 13:39     ` Ulf Hansson
2018-03-15 13:39       ` Ulf Hansson
2018-03-15 17:24       ` Evgeniy Didin [this message]
2018-03-15 17:24         ` Evgeniy Didin
2018-03-16  7:41         ` Ulf Hansson
2018-03-16  7:41           ` Ulf Hansson

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=1521134649.10304.7.camel@synopsys.com \
    --to=evgeniy.didin@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    /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.