diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libata-core.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 0a2936a140c8..46c4cdbaee86 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3097,10 +3097,21 @@ static void ata_pio_data_xfer(struct ata_port *ap, unsigned char *buf, | |||
3097 | static void ata_data_xfer(struct ata_port *ap, unsigned char *buf, | 3097 | static void ata_data_xfer(struct ata_port *ap, unsigned char *buf, |
3098 | unsigned int buflen, int do_write) | 3098 | unsigned int buflen, int do_write) |
3099 | { | 3099 | { |
3100 | if (ap->flags & ATA_FLAG_MMIO) | 3100 | /* Make the crap hardware pay the costs not the good stuff */ |
3101 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | 3101 | if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) { |
3102 | else | 3102 | unsigned long flags; |
3103 | ata_pio_data_xfer(ap, buf, buflen, do_write); | 3103 | local_irq_save(flags); |
3104 | if (ap->flags & ATA_FLAG_MMIO) | ||
3105 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | ||
3106 | else | ||
3107 | ata_pio_data_xfer(ap, buf, buflen, do_write); | ||
3108 | local_irq_restore(flags); | ||
3109 | } else { | ||
3110 | if (ap->flags & ATA_FLAG_MMIO) | ||
3111 | ata_mmio_data_xfer(ap, buf, buflen, do_write); | ||
3112 | else | ||
3113 | ata_pio_data_xfer(ap, buf, buflen, do_write); | ||
3114 | } | ||
3104 | } | 3115 | } |
3105 | 3116 | ||
3106 | /** | 3117 | /** |