projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
[deliverable/linux.git]
/
drivers
/
ata
/
libahci.c
diff --git
a/drivers/ata/libahci.c
b/drivers/ata/libahci.c
index 71b07198e207d2577a8e52fe736f91f54b39a226..7461a587b39b4e9d953e3a0063b9f1fb8cad0319 100644
(file)
--- a/
drivers/ata/libahci.c
+++ b/
drivers/ata/libahci.c
@@
-1975,7
+1975,7
@@
unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
*/
pp->active_link = qc->dev->link;
*/
pp->active_link = qc->dev->link;
- if (
qc->tf.protocol == ATA_PROT_NCQ
)
+ if (
ata_is_ncq(qc->tf.protocol)
)
writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
@@
-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;
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);
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)
}
void ahci_print_info(struct ata_host *host, const char *scc_s)
This page took
0.052615 seconds
and
5
git commands to generate.