Re: [PATCH 6/6] Implement the AHCI suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux