

Convert the aic7xxx driver to the new API.  


 drivers/scsi/aic7xxx/aic79xx_inline.h |   29 +++++++++++++++++++----------
 drivers/scsi/aic7xxx/aic79xx_osm.c    |    5 +++--
 drivers/scsi/aic7xxx/aic79xx_osm.h    |    3 ++-
 3 files changed, 24 insertions(+), 13 deletions(-)

diff -puN drivers/scsi/aic7xxx/aic79xx_inline.h~irqreturn-aic79xx drivers/scsi/aic7xxx/aic79xx_inline.h
--- 25/drivers/scsi/aic7xxx/aic79xx_inline.h~irqreturn-aic79xx	2003-04-24 05:17:12.000000000 -0700
+++ 25-akpm/drivers/scsi/aic7xxx/aic79xx_inline.h	2003-04-24 05:17:12.000000000 -0700
@@ -805,7 +805,6 @@ ahd_get_sense_bufaddr(struct ahd_softc *
 static __inline void	ahd_sync_qoutfifo(struct ahd_softc *ahd, int op);
 static __inline void	ahd_sync_tqinfifo(struct ahd_softc *ahd, int op);
 static __inline u_int	ahd_check_cmdcmpltqueues(struct ahd_softc *ahd);
-static __inline void	ahd_intr(struct ahd_softc *ahd);
 
 static __inline void
 ahd_sync_qoutfifo(struct ahd_softc *ahd, int op)
@@ -862,12 +861,13 @@ ahd_check_cmdcmpltqueues(struct ahd_soft
 }
 
 /*
- * Catch an interrupt from the adapter
+ * Catch an interrupt from the adapter.  Return non-zero if we handled it.
  */
-static __inline void
+static inline int
 ahd_intr(struct ahd_softc *ahd)
 {
 	u_int	intstat;
+	int handled = 0;
 
 	if ((ahd->pause & INTEN) == 0) {
 		/*
@@ -876,7 +876,7 @@ ahd_intr(struct ahd_softc *ahd)
 		 * so just return.  This is likely just a shared
 		 * interrupt.
 		 */
-		return;
+		goto out;
 	}
 
 	/*
@@ -892,6 +892,7 @@ ahd_intr(struct ahd_softc *ahd)
 		intstat = ahd_inb(ahd, INTSTAT);
 
 	if (intstat & CMDCMPLT) {
+		handled = 1;
 		ahd_outb(ahd, CLRINT, CLRCMDINT);
 
 		/*
@@ -926,26 +927,34 @@ ahd_intr(struct ahd_softc *ahd)
 
 	if (intstat == 0xFF && (ahd->features & AHD_REMOVABLE) != 0)
 		/* Hot eject */
-		return;
+		goto out;
 
 	if ((intstat & INT_PEND) == 0)
-		return;
+		goto out;
 
 	if (intstat & HWERRINT) {
+		handled = 1;
 		ahd_handle_hwerrint(ahd);
-		return;
+		goto out;
 	}
 
 	if ((intstat & (PCIINT|SPLTINT)) != 0) {
+		handled = 1;
 		ahd->bus_intr(ahd);
-		return;
+		goto out;
 	}
 
-	if ((intstat & SEQINT) != 0)
+	if ((intstat & SEQINT) != 0) {
+		handled = 1;
 		ahd_handle_seqint(ahd, intstat);
+	}
 
-	if ((intstat & SCSIINT) != 0)
+	if ((intstat & SCSIINT) != 0) {
+		handled = 1;
 		ahd_handle_scsiint(ahd, intstat);
+	}
+out:
+	return IRQ_RETVAL(handled);
 }
 
 #endif  /* _AIC79XX_INLINE_H_ */
diff -puN drivers/scsi/aic7xxx/aic79xx_osm.c~irqreturn-aic79xx drivers/scsi/aic7xxx/aic79xx_osm.c
--- 25/drivers/scsi/aic7xxx/aic79xx_osm.c~irqreturn-aic79xx	2003-04-24 05:17:12.000000000 -0700
+++ 25-akpm/drivers/scsi/aic7xxx/aic79xx_osm.c	2003-04-24 05:17:12.000000000 -0700
@@ -1966,7 +1966,7 @@ ahd_linux_setup_iocell_info(void *arg, i
 {
 	u_int index;
 
-	index = (u_int)arg;
+	index = (u_int)(long)arg;
 	if ((instance >= 0)
 	 && (instance < NUM_ELEMENTS(aic79xx_iocell_info))) {
 		uint8_t *iocell_info;
@@ -4201,7 +4201,7 @@ ahd_linux_run_device_queue(struct ahd_so
 /*
  * SCSI controller interrupt handler.
  */
-void
+irqreturn_t
 ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs)
 {
 	struct	ahd_softc *ahd;
@@ -4222,6 +4222,7 @@ ahd_linux_isr(int irq, void *dev_id, str
 		}
 	}
 	ahd_unlock(ahd, &flags);
+	return IRQ_HANDLED;
 }
 
 void
diff -puN drivers/scsi/aic7xxx/aic79xx_osm.h~irqreturn-aic79xx drivers/scsi/aic7xxx/aic79xx_osm.h
--- 25/drivers/scsi/aic7xxx/aic79xx_osm.h~irqreturn-aic79xx	2003-04-24 05:17:12.000000000 -0700
+++ 25-akpm/drivers/scsi/aic7xxx/aic79xx_osm.h	2003-04-24 05:17:12.000000000 -0700
@@ -51,6 +51,7 @@
 #include <linux/smp_lock.h>
 #include <linux/version.h>
 #include <linux/module.h>
+#include <linux/interrupt.h>
 #include <asm/byteorder.h>
 #include <asm/io.h>
 
@@ -1270,7 +1271,7 @@ void	ahd_platform_set_tags(struct ahd_so
 int	ahd_platform_abort_scbs(struct ahd_softc *ahd, int target,
 				char channel, int lun, u_int tag,
 				role_t role, uint32_t status);
-void	ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs);
+irqreturn_t ahd_linux_isr(int irq, void *dev_id, struct pt_regs * regs);
 void	ahd_platform_flushwork(struct ahd_softc *ahd);
 int	ahd_softc_comp(struct ahd_softc *, struct ahd_softc *);
 void	ahd_done(struct ahd_softc*, struct scb*);

_
