Date: Tue, 10 Jun 1997 17:18:43 +0200 (MET DST)
From: Jesper Skov <jskov@cs.auc.dk>
To: linux-m68k@phil.uni-sb.de
Subject: L68K: ESP patches for 2.1.42
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

Pretty much your patches, Patrik :)

-- Jesper

diff -u --recursive -B --exclude-from=/pack/kernel/tools/lib/diff-excludes -P /pack/kernel/dist/linux-2.1.42/drivers/scsi/esp.c ./drivers/scsi/esp.c
--- /pack/kernel/dist/linux-2.1.42/drivers/scsi/esp.c	Fri May 16 09:09:45 1997
+++ ./drivers/scsi/esp.c	Tue Jun 10 14:52:39 1997
@@ -956,7 +956,7 @@
 	int i;
 
 	/* Hold off if we've been reselected or an IRQ is showing... */
-	if(esp->disconnected_SC || DMA_IRQ_P(dregs))
+	if(esp->disconnected_SC || esp->dma_irq_p(esp))
 		return;
 
 	/* Grab first member of the issue queue. */
@@ -1249,10 +1249,10 @@
 		mmu_get_scsi_sgl((struct mmu_sglist *) SCpnt->SCp.buffer,
 				 SCpnt->SCp.buffers_residual,
 				 ((struct linux_sbus_device *) (esp->edev))->my_bus);
-		SCpnt->SCp.ptr              = (char *) SCpnt->SCp.buffer->dvma_address;
-#else
 		/* XXX Again these casts are sick... -DaveM */
 		SCpnt->SCp.ptr=(char *)((unsigned long)SCpnt->SCp.buffer->dvma_address);
+#else
+		SCpnt->SCp.ptr = SCpnt->SCp.buffer->address;
 #endif
 	}
 	SCpnt->SCp.Status           = CHECK_CONDITION;
@@ -1384,7 +1384,7 @@
 	 */
 	don = esp->dma_ports_p(esp);
 	if(don) {
-		DMA_INTSOFF(dregs);
+		esp->dma_ints_off(esp);
 		synchronize_irq();
 	}
 	if(esp->issue_SC) {
@@ -3654,16 +3654,16 @@
 #ifndef __sparc_v9__
 		if((esp->irq & 0xf) == irq) {
 #endif
-			if(DMA_IRQ_P(esp->dregs)) {
+			if(esp->dma_irq_p(esp)) {
 				again = 1;
 
-				DMA_INTSOFF(esp->dregs);
+				esp->dma_ints_off(esp);
 
 				ESPIRQ(("I%d(", esp->esp_id));
 				esp_handle(esp);
 				ESPIRQ((")"));
 
-				DMA_INTSON(esp->dregs);
+				esp->dma_ints_on(esp);
 			}
 #ifndef __sparc_v9__
 		}
@@ -3686,15 +3686,15 @@
 	/* Handle all ESP interrupts showing at this IRQ level. */
 	for_each_esp(esp) {
 		if((esp->irq & 0xf) == irq) {
-			if(DMA_IRQ_P(esp->dregs)) {
-				DMA_INTSOFF(esp->dregs);
+			if(esp->dma_irq_p(esp)) {
+				esp->dma_ints_off(esp);
 
 				ESPIRQ(("I[%d:%d](",
 					smp_processor_id(), esp->esp_id));
 				esp_handle(esp);
 				ESPIRQ((")"));
 
-				DMA_INTSON(esp->dregs);
+				esp->dma_ints_on(esp);
 				return;
 			}
 		}
diff -u --recursive -B --exclude-from=/pack/kernel/tools/lib/diff-excludes -P /pack/kernel/dist/linux-2.1.42/include/asm-m68k/hardirq.h ./include/asm-m68k/hardirq.h
--- /pack/kernel/dist/linux-2.1.42/include/asm-m68k/hardirq.h	Mon Apr 28 15:40:23 1997
+++ ./include/asm-m68k/hardirq.h	Tue Jun 10 14:31:37 1997
@@ -12,4 +12,6 @@
 #define hardirq_enter(cpu)	(local_irq_count[cpu]++)
 #define hardirq_exit(cpu)	(local_irq_count[cpu]--)
 
+#define synchronize_irq()	do { } while (0)
+
 #endif

