On Sat, 2006-06-03 at 22:35 +0900, Tejun Heo wrote: > > + */ > > + tmp = readl(mmio + HOST_CTL); > > + if (!(tmp & HOST_IRQ_EN)) { > > + u32 irq_stat; > > + > > + /* ack any pending irq events for this port */ > > + irq_stat = readl(port_mmio + PORT_IRQ_STAT); > > + if (irq_stat) > > + writel(irq_stat, port_mmio + PORT_IRQ_STAT); > > + > > + /* set irq mask (enables interrupts) */ > > + writel(DEF_PORT_IRQ, port_mmio + PORT_IRQ_MASK); > > + > > + if ((hpriv->dev_map >> (ap->port_no + 1)) == 0) { > > + /* > > + * Enable interrupts if this was the last port > > + */ > > + ata_port_printk(ap, KERN_INFO, "Enable interrupts\n"); > > + > > + irq_stat = readl(mmio + HOST_IRQ_STAT); > > + if (irq_stat) > > + writel(irq_stat, mmio + HOST_IRQ_STAT); > > + > > + tmp |= HOST_IRQ_EN; > > + writel(tmp, mmio + HOST_CTL); > > + (void) readl(mmio + HOST_CTL); > > + } > > Can't above enable-IRQ block be moved into ahci_pci_device_resume() > after resuming all ports? Tejun, I think you're right, the "dev_map" is an ugly hack. I'll move above enable-IRQ block to ahci_pci_device_resume(), thus removing "dev_map" in the next round of updated patches. Thanks, Forrest - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html