Răsfoiți Sursa

ahci: port_no should be used when clearing IRQ in ahci_thaw()

ap->id is logcial port ID which is unique among all ATA ports and
doesn't have anything to do with hardware port index.  ap->port_no is
the hardware port index and thus should be used when clearing IRQ mask
in ahci_thaw().

This problem has been spotted by Jeff Garzik <jgarzik@pobox.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo 18 ani în urmă
părinte
comite
a718728f9e
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/ata/ahci.c

+ 1 - 1
drivers/ata/ahci.c

@@ -1282,7 +1282,7 @@ static void ahci_thaw(struct ata_port *ap)
 	/* clear IRQ */
 	/* clear IRQ */
 	tmp = readl(port_mmio + PORT_IRQ_STAT);
 	tmp = readl(port_mmio + PORT_IRQ_STAT);
 	writel(tmp, port_mmio + PORT_IRQ_STAT);
 	writel(tmp, port_mmio + PORT_IRQ_STAT);
-	writel(1 << ap->id, mmio + HOST_IRQ_STAT);
+	writel(1 << ap->port_no, mmio + HOST_IRQ_STAT);
 
 
 	/* turn IRQ back on */
 	/* turn IRQ back on */
 	writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK);
 	writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK);