mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tj@kernel.org" <tj@kernel.org>
To: Pang Raymond <Raymond_rule@hotmail.com>
Cc: ide linux <linux-ide@vger.kernel.org>,
	kernel linux <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
Date: Wed, 20 Jul 2016 11:11:27 -0400	[thread overview]
Message-ID: <20160720151127.GA4574@htj.duckdns.org> (raw)
In-Reply-To: <HK2PR03MB1732DDEDFCE52EB9A76DA1B0FC080@HK2PR03MB1732.apcprd03.prod.outlook.com>

On Wed, Jul 20, 2016 at 12:13:46PM +0000, Pang Raymond wrote:
> 
> Due to PCI subsystem behaviour, unloading AHCI driver will disable 
> MSI and enable INTx. When HBA supports MSIx or Multiple MSI, Driver's
> irq handler doesn't clear GHC.IS register. It works well when reading or
> writing data and GHC.IS is always non-zero. But when unloading driver
> (or any other operation which causes disable MSIx and enable INTx), PCI
>  subsystem uses config write(Rx04.bit10) to enable INTx. Because
> GHC.IS is non-zero, HBA will falsely assume some port needs interrupt 
> service. Then it asserts INTx. To make things worse, when AHCI controller
> shares the same interrupt pin with other PCI device, that PCI device's ISR
> will be called and nobody de-asserts previous INTx.
> This patch clears GHC.IS in ahci_port_stop() even when using MSIx or 
> MMSI to prevent this case. It ensures GHC.IS is zero before PCI subsystem 
> enables INTx.
> 
> Signed-off-by: Raymond Pang <raymond_rule@hotmail.com>

Applied to libata/for-4.8 with minor updates to the comment.

Thanks.

-- 
tejun

           reply	other threads:[~2016-07-20 15:12 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <HK2PR03MB1732DDEDFCE52EB9A76DA1B0FC080@HK2PR03MB1732.apcprd03.prod.outlook.com>]

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=20160720151127.GA4574@htj.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®