diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libahci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 3e69c20e9d03..7461a587b39b 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -2392,12 +2392,20 @@ static int ahci_port_start(struct ata_port *ap) 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 to prevent stuck INTx after disabling MSI and + * re-enabling INTx. + */ + writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT); } void ahci_print_info(struct ata_host *host, const char *scc_s) |