From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Niklas Cassel <nks@flawful.org>, Li Nan <linan122@huawei.com>,
Li Nan <linan666@huaweicloud.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 2/2] ata: libata-eh: do not thaw the port twice in ata_eh_reset()
Date: Thu, 14 Sep 2023 10:11:45 +0000 [thread overview]
Message-ID: <ZQLcYP2a/og3mCN4@x1-carbon> (raw)
In-Reply-To: <2bc9d113-1119-12c3-f459-4dab8d8f6aa6@kernel.org>
On Thu, Sep 14, 2023 at 07:02:38PM +0900, Damien Le Moal wrote:
> On 9/14/23 18:06, Niklas Cassel wrote:
> > On Thu, Sep 14, 2023 at 08:51:06AM +0900, Damien Le Moal wrote:
> >> On 9/14/23 07:19, Niklas Cassel wrote:
> >>> From: Niklas Cassel <niklas.cassel@wdc.com>
> >>>
> >>> commit 1e641060c4b5 ("libata: clear eh_info on reset completion") added
> >>> a workaround that broke the retry mechanism in ATA EH.
> >>>
> >>> Tejun himself suggested to remove this workaround when it was identified
> >>> to cause additional problems:
> >>> https://lore.kernel.org/linux-ide/20110426135027.GI878@htj.dyndns.org/
> >>>
> >>> He and even said:
> >>> "Hmm... it seems I wasn't thinking straight when I added that work around."
> >>> https://lore.kernel.org/linux-ide/20110426155229.GM878@htj.dyndns.org/
> >>>
> >>> While removing the workaround solved the issue, however, the workaround was
> >>> kept to avoid "spurious hotplug events during reset", and instead another
> >>> workaround was added on top of the existing workaround in commit
> >>> 8c56cacc724c ("libata: fix unexpectedly frozen port after ata_eh_reset()").
> >>>
> >>> Because these IRQs happened when the port was frozen, we know that they
> >>> were actually a side effect of PxIS and IS.IPS(x) not being cleared before
> >>> the COMRESET. This is now done in commit 94152042eaa9 ("ata: libahci: clear
> >>> pending interrupt status"), so these workarounds can now be removed.
> >>>
> >>> Since commit 1e641060c4b5 ("libata: clear eh_info on reset completion") has
> >>> now been reverted, the ATA EH retry mechanism is functional again, so there
> >>> is once again no need to thaw the port more than once in ata_eh_reset().
> >>>
> >>> This reverts "the workaround on top of the workaround" introduced in commit
> >>> 8c56cacc724c ("libata: fix unexpectedly frozen port after ata_eh_reset()").
> >>>
> >>> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> >>
> >> We need a fixes tag. Same for patch 1.
> >
> > The workaround introduced in commit 1e641060c4b5 ("libata: clear eh_info on
> > reset completion") broke ATA EH retry logic, so the proper commit that we
> > fix is that commit.
> >
> > However, if we put a Fixes tag with that commit, then this patch will get
> > backported to all possible stable kernels that has that commit, something
> > that we do _not_ want.
> >
> > We can only remove this workaround for kernels that has commit 94152042eaa9
> > ("ata: libahci: clear pending interrupt status").
>
> Squash the 2 fixes together in a single commit ?
We can do that, but the problem would be the same.
commit 94152042eaa9 ("ata: libahci: clear pending interrupt status") is
currently in your for-next branch. Patch 1 and patch 2 in this series
depend on this commit.
Both of these fixes (patch 1 and patch 2 in this series) fix issues caused
by commit 1e641060c4b5 ("libata: clear eh_info on reset completion"),
a 14 year old commit.
We could add a Fixes that on 1e641060c4b5 ("libata: clear eh_info on reset
completion").
But might get this patch to get backported to all old kernels.
We don't want that, as we depend on 94152042eaa9 ("ata: libahci: clear
pending interrupt status").
So... skip a Fixes tag or add a Fixes against on the commit that we depend
on? (Even tough we are not "fixing" that commit.)
Kind regards,
Niklas
next prev parent reply other threads:[~2023-09-14 10:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 22:19 [PATCH 1/2] ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset() Niklas Cassel
2023-09-13 22:19 ` [PATCH 2/2] ata: libata-eh: do not thaw the port twice " Niklas Cassel
2023-09-13 23:51 ` Damien Le Moal
2023-09-14 9:06 ` Niklas Cassel
2023-09-14 10:02 ` Damien Le Moal
2023-09-14 10:11 ` Niklas Cassel [this message]
2023-09-14 10:38 ` Damien Le Moal
2023-09-15 6:30 ` Damien Le Moal
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=ZQLcYP2a/og3mCN4@x1-carbon \
--to=niklas.cassel@wdc.com \
--cc=dlemoal@kernel.org \
--cc=linan122@huawei.com \
--cc=linan666@huaweicloud.com \
--cc=linux-ide@vger.kernel.org \
--cc=nks@flawful.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.