From: "tj@kernel.org" <tj@kernel.org>
To: Pang Raymond <Raymond_rule@hotmail.com>
Cc: linux ide <linux-ide@vger.kernel.org>,
linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.
Date: Mon, 18 Jul 2016 18:28:03 -0400 [thread overview]
Message-ID: <20160718222803.GK3078@mtj.duckdns.org> (raw)
In-Reply-To: <HK2PR03MB1732E094DCB79C7EF0F5C1B4FC330@HK2PR03MB1732.apcprd03.prod.outlook.com>
Hello, Pang.
On Fri, Jul 15, 2016 at 12:39:59PM +0000, Pang Raymond wrote:
> Hi Tejun,
>
>
> Yes! It only happens when the device is shutdown.
>
> I think you're right. It's more wiser to add clearing operation to driver
>
> clean up path.
>
> So we can add it to ahci_port_stop()
>
>
> libahci.c is got from Kernel 4.6.3 stable
>
> ============================================================
>
> --- drivers/ata/libahci.c.old 2016-07-15 13:33:47.489620405 +0800
> +++ drivers/ata/libahci.c 2016-07-15 14:01:33.081574586 +0800
> @@ -2392,12 +2392,18 @@
> static void ahci_port_stop(struct ata_port *ap)
> {
> const char *emsg = NULL;
> + struct ahci_host_priv *hpriv = ap->host->private_data;
> + void __iomem *host_mmio = hpriv->mmio;
> int rc;
>
> /* de-initialize port */
> rc = ahci_deinit_port(ap, &emsg);
> if (rc)
> ata_port_warn(ap, "%s (%d)\n", emsg, rc);
> +
> + /* Clear GHC.IS in case of asserting INTx after disable MSIx and re-enable INTx */
> + writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
> +
> }
Yeah, this looks good to me. Can you please format the patch
properly, add description and Signed-off-by?
https://www.kernel.org/doc/Documentation/SubmittingPatches
Thanks.
--
tejun
prev parent reply other threads:[~2016-07-18 22:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <HK2PR03MB173248BF420102DE4E54BD6EFC3A0@HK2PR03MB1732.apcprd03.prod.outlook.com>
2016-07-06 13:52 ` tj
[not found] ` <HK2PR03MB1732DE50EA9D44F23481968AFC3F0@HK2PR03MB1732.apcprd03.prod.outlook.com>
2016-07-12 17:30 ` 答复: " tj
[not found] ` <HK2PR03MB1732E094DCB79C7EF0F5C1B4FC330@HK2PR03MB1732.apcprd03.prod.outlook.com>
2016-07-18 22:28 ` tj [this message]
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=20160718222803.GK3078@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=Raymond_rule@hotmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®