]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'upstream'
authorJeff Garzik <jeff@garzik.org>
Thu, 30 Mar 2006 00:59:39 +0000 (19:59 -0500)
committerJeff Garzik <jeff@garzik.org>
Thu, 30 Mar 2006 00:59:39 +0000 (19:59 -0500)
Conflicts:

drivers/scsi/sata_mv.c

1  2 
drivers/scsi/libata-core.c
drivers/scsi/sata_mv.c
include/linux/libata.h

Simple merge
index 2819a75c4a841bd56de154404bf8633185a8fe65,fa901fd650856e8f7b241ff5285bcc3ab84c4c6e..4d965601efcfb0d91b4cc3dafb0c5ff82a9c8ece
@@@ -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);
index 0eb71c1773a16a3d600ed58188c75ca58340b811,0d61357604d5b24726c9dd2fd410b264a75182bb..b248cb020f87bf61a7a094b0a93e7b6205868cb9
@@@ -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,