提交 a1bd9e68 编写于 作者: A Alan Cox 提交者: Jeff Garzik

[PATCH] libata: Code for the IRQ mask flag

Signed-off-by: NAlan Cox <alan@redhat.com>

Somewhat cleaner in the resync as someone cleaned up the pio xfer users
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 9d824d07
......@@ -3097,10 +3097,21 @@ static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf,
static void ata_data_xfer(struct ata_port *ap, unsigned char *buf,
unsigned int buflen, int do_write)
{
if (ap->flags & ATA_FLAG_MMIO)
ata_mmio_data_xfer(ap, buf, buflen, do_write);
else
ata_pio_data_xfer(ap, buf, buflen, do_write);
/* Make the crap hardware pay the costs not the good stuff */
if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) {
unsigned long flags;
local_irq_save(flags);
if (ap->flags & ATA_FLAG_MMIO)
ata_mmio_data_xfer(ap, buf, buflen, do_write);
else
ata_pio_data_xfer(ap, buf, buflen, do_write);
local_irq_restore(flags);
} else {
if (ap->flags & ATA_FLAG_MMIO)
ata_mmio_data_xfer(ap, buf, buflen, do_write);
else
ata_pio_data_xfer(ap, buf, buflen, do_write);
}
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册