ahci: port_no should be used when clearing IRQ in ahci_thaw()
[powerpc.git] / drivers / ata / ahci.c
index 2fe5a58..48616c6 100644 (file)
@@ -903,7 +903,7 @@ static int ahci_hardreset(struct ata_port *ap, unsigned int *class)
 
        /* clear D2H reception area to properly wait for D2H FIS */
        ata_tf_init(ap->device, &tf);
-       tf.command = 0xff;
+       tf.command = 0x80;
        ata_tf_to_fis(&tf, d2h_fis, 0);
 
        rc = sata_std_hardreset(ap, class);
@@ -1178,7 +1178,8 @@ static void ahci_host_intr(struct ata_port *ap)
                ata_port_printk(ap, KERN_INFO, "Spurious SDB FIS during NCQ "
                                "issue=0x%x SAct=0x%x FIS=%08x:%08x%s\n",
                                readl(port_mmio + PORT_CMD_ISSUE),
-                               readl(port_mmio + PORT_SCR_ACT), f[0], f[1],
+                               readl(port_mmio + PORT_SCR_ACT),
+                               le32_to_cpu(f[0]), le32_to_cpu(f[1]),
                                pp->ncq_saw_spurious_sdb_cnt < 10 ?
                                "" : ", shutting up");
 
@@ -1281,7 +1282,7 @@ static void ahci_thaw(struct ata_port *ap)
        /* clear IRQ */
        tmp = readl(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 */
        writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK);