aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index d52b73ab795a..baf7d0562190 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -175,6 +175,7 @@ enum {
175 AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */ 175 AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */
176 AHCI_FLAG_MV_PATA = (1 << 29), /* PATA port */ 176 AHCI_FLAG_MV_PATA = (1 << 29), /* PATA port */
177 AHCI_FLAG_NO_MSI = (1 << 30), /* no PCI MSI */ 177 AHCI_FLAG_NO_MSI = (1 << 30), /* no PCI MSI */
178 AHCI_FLAG_NO_HOTPLUG = (1 << 31), /* ignore PxSERR.DIAG.N */
178 179
179 AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 180 AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
180 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | 181 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
@@ -215,6 +216,7 @@ struct ahci_port_priv {
215 unsigned int ncq_saw_d2h:1; 216 unsigned int ncq_saw_d2h:1;
216 unsigned int ncq_saw_dmas:1; 217 unsigned int ncq_saw_dmas:1;
217 unsigned int ncq_saw_sdb:1; 218 unsigned int ncq_saw_sdb:1;
219 u32 intr_mask; /* interrupts to enable */
218}; 220};
219 221
220static int ahci_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val); 222static int ahci_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
@@ -1552,6 +1554,7 @@ static void ahci_thaw(struct ata_port *ap)
1552 void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR]; 1554 void __iomem *mmio = ap->host->iomap[AHCI_PCI_BAR];
1553 void __iomem *port_mmio = ahci_port_base(ap); 1555 void __iomem *port_mmio = ahci_port_base(ap);
1554 u32 tmp; 1556 u32 tmp;
1557 struct ahci_port_priv *pp = ap->private_data;
1555 1558
1556 /* clear IRQ */ 1559 /* clear IRQ */
1557 tmp = readl(port_mmio + PORT_IRQ_STAT); 1560 tmp = readl(port_mmio + PORT_IRQ_STAT);
@@ -1559,7 +1562,7 @@ static void ahci_thaw(struct ata_port *ap)
1559 writel(1 << ap->port_no, mmio + HOST_IRQ_STAT); 1562 writel(1 << ap->port_no, mmio + HOST_IRQ_STAT);
1560 1563
1561 /* turn IRQ back on */ 1564 /* turn IRQ back on */
1562 writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); 1565 writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
1563} 1566}
1564 1567
1565static void ahci_error_handler(struct ata_port *ap) 1568static void ahci_error_handler(struct ata_port *ap)
@@ -1713,6 +1716,12 @@ static int ahci_port_start(struct ata_port *ap)
1713 pp->cmd_tbl = mem; 1716 pp->cmd_tbl = mem;
1714 pp->cmd_tbl_dma = mem_dma; 1717 pp->cmd_tbl_dma = mem_dma;
1715 1718
1719 /*
1720 * Save off initial list of interrupts to be enabled.
1721 * This could be changed later
1722 */
1723 pp->intr_mask = DEF_PORT_IRQ;
1724
1716 ap->private_data = pp; 1725 ap->private_data = pp;
1717 1726
1718 /* engage engines, captain */ 1727 /* engage engines, captain */