linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
       [not found] <HK2PR03MB1732DDEDFCE52EB9A76DA1B0FC080@HK2PR03MB1732.apcprd03.prod.outlook.com>
@ 2016-07-20 15:11 ` tj
  0 siblings, 0 replies; only message in thread
From: tj @ 2016-07-20 15:11 UTC (permalink / raw)
  To: Pang Raymond; +Cc: ide linux, kernel linux

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-20 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <HK2PR03MB1732DDEDFCE52EB9A76DA1B0FC080@HK2PR03MB1732.apcprd03.prod.outlook.com>
2016-07-20 15:11 ` [PATCH] AHCI: Clear GHC.IS to prevent unexpectly asserting INTx tj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).