diff -Naur --exclude-from=/work/dontdiff linux-2.5.25-vanilla/drivers/ide/ide-pci.c linux-2.5.25-mx/drivers/ide/ide-pci.c
--- linux-2.5.25-vanilla/drivers/ide/ide-pci.c	Sat Jul  6 02:42:33 2002
+++ linux-2.5.25-mx/drivers/ide/ide-pci.c	Sat Jul 13 09:55:16 2002
@@ -171,7 +171,6 @@
 		int autodma)
 {
 	unsigned long base = 0;
-	unsigned long dma_base;
 	unsigned long ctl = 0;
 	ide_pci_enablebit_t *e = &(d->enablebits[port]);
 	struct ata_channel *ch;
@@ -266,57 +265,60 @@
 	}
 
 #ifdef CONFIG_BLK_DEV_IDEDMA
-	/*
-	 * Setup DMA transfers on the channel.
-	 */
-	if (d->flags & ATA_F_NOADMA)
-		autodma = 0;
-
-	if (autodma)
-		ch->autodma = 1;
-
-	if (!((d->flags & ATA_F_DMA) || ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))))
-		goto no_dma;
-	/*
-	 * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space:
-	 */
-	dma_base = pci_resource_start(dev, 4);
-	if (dma_base) {
-		/* PDC20246, PDC20262, HPT343, & HPT366 */
-		if ((ch->unit == ATA_PRIMARY) && d->extra) {
-			request_region(dma_base + 16, d->extra, dev->name);
-			ch->dma_extra = d->extra;
-		}
-
-		/* If we are on the second channel, the dma base address will
-		 * be one entry away from the primary interface.
+	{
+		int dma_base; 
+		/*
+		 * Setup DMA transfers on the channel.
 		 */
-		if (ch->unit == ATA_SECONDARY)
-			dma_base += 8;
-
-		if (d->flags & ATA_F_SIMPLEX) {
-			outb(inb(dma_base + 2) & 0x60, dma_base + 2);
-			if (inb(dma_base + 2) & 0x80)
-				printk(KERN_INFO "%s: simplex device: DMA forced\n", dev->name);
-		} else {
-			/* If the device claims "simplex" DMA, this means only
-			 * one of the two interfaces can be trusted with DMA at
-			 * any point in time.  So we should enable DMA only on
-			 * one of the two interfaces.
+		if (d->flags & ATA_F_NOADMA)
+			autodma = 0;
+		
+		if (autodma)
+			ch->autodma = 1;
+		
+		if (!((d->flags & ATA_F_DMA) || ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))))
+			goto no_dma;
+		/*
+		 * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space:
+		 */
+		dma_base = pci_resource_start(dev, 4);
+		if (dma_base) {
+			/* PDC20246, PDC20262, HPT343, & HPT366 */
+			if ((ch->unit == ATA_PRIMARY) && d->extra) {
+				request_region(dma_base + 16, d->extra, dev->name);
+				ch->dma_extra = d->extra;
+			}
+			
+			/* If we are on the second channel, the dma base address will
+			 * be one entry away from the primary interface.
 			 */
+			if (ch->unit == ATA_SECONDARY)
+				dma_base += 8;
+			
+			if (d->flags & ATA_F_SIMPLEX) {
+				outb(inb(dma_base + 2) & 0x60, dma_base + 2);
+				if (inb(dma_base + 2) & 0x80)
+					printk(KERN_INFO "%s: simplex device: DMA forced\n", dev->name);
+			} else {
+				/* If the device claims "simplex" DMA, this means only
+				 * one of the two interfaces can be trusted with DMA at
+				 * any point in time.  So we should enable DMA only on
+				 * one of the two interfaces.
+				 */
 			if ((inb(dma_base + 2) & 0x80)) {
 				if ((!ch->drives[0].present && !ch->drives[1].present) ||
-						ch->unit == ATA_SECONDARY) {
+				    ch->unit == ATA_SECONDARY) {
 					printk(KERN_INFO "%s: simplex device:  DMA disabled\n", dev->name);
 					dma_base = 0;
 				}
 			}
+			}
+		} else {
+			printk(KERN_INFO "%s: %s Bus-Master DMA was disabled by BIOS\n",
+			       ch->name, dev->name);
+			
+			goto no_dma;
 		}
-	} else {
-		printk(KERN_INFO "%s: %s Bus-Master DMA was disabled by BIOS\n",
-				ch->name, dev->name);
-
-		goto no_dma;
 	}
 
 	/* The function below will check itself whatever there is something to
