From: Jeff Garzik Date: Thu, 30 Mar 2006 00:59:39 +0000 (-0500) Subject: Merge branch 'upstream' X-Git-Tag: v2.6.18-rc1~1079^2~98^2~13^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4f0e7c51ae392d841be395a9c6b8d26a9fbf33d2;p=linux-2.6-omap-h63xx.git Merge branch 'upstream' Conflicts: drivers/scsi/sata_mv.c --- 4f0e7c51ae392d841be395a9c6b8d26a9fbf33d2 diff --cc drivers/scsi/sata_mv.c index 2819a75c4a8,fa901fd6508..4d965601efc --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@@ -1377,20 -1378,26 +1378,26 @@@ static void mv_host_intr(struct ata_hos hard_port = port & MV_PORT_MASK; /* range 0-3 */ handled = 0; /* ensure ata_status is set if handled++ */ - if ((CRPB_DMA_DONE << hard_port) & hc_irq_cause) { - /* new CRPB on the queue; just one at a time until NCQ - */ - ata_status = mv_get_crpb_status(ap); - handled++; - } else if ((DEV_IRQ << hard_port) & hc_irq_cause) { - /* received ATA IRQ; read the status reg to clear INTRQ - */ - ata_status = readb((void __iomem *) + /* Note that DEV_IRQ might happen spuriously during EDMA, + * and should be ignored in such cases. We could mask it, + * but it's pretty rare and may not be worth the overhead. + */ + if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) { + /* EDMA: check for response queue interrupt */ + if ((CRPB_DMA_DONE << hard_port) & hc_irq_cause) { + ata_status = mv_get_crpb_status(ap); + handled = 1; + } + } else { + /* PIO: check for device (drive) interrupt */ + if ((DEV_IRQ << hard_port) & hc_irq_cause) { + ata_status = readb((void __iomem *) ap->ioaddr.status_addr); - handled++; + handled = 1; + } } - if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) + if (ap && (ap->flags & ATA_FLAG_PORT_DISABLED)) continue; err_mask = ac_err_mask(ata_status); diff --cc include/linux/libata.h index 0eb71c1773a,0d61357604d..b248cb020f8 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@@ -161,9 -160,15 +161,12 @@@ enum ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, ATA_QCFLAG_EH_SCHEDULED = (1 << 5), /* EH scheduled */ + /* host set flags */ + ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host_set only */ + /* various lengths of time */ - ATA_TMOUT_PIO = 30 * HZ, ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ - ATA_TMOUT_CDB = 30 * HZ, - ATA_TMOUT_CDB_QUICK = 5 * HZ, ATA_TMOUT_INTERNAL = 30 * HZ, ATA_TMOUT_INTERNAL_QUICK = 5 * HZ,