* [hch@lst.de: [PATCH] drop dead 2.0 compat code in CENSORED
@ 2003-04-21 10:04 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2003-04-21 10:04 UTC (permalink / raw)
To: linux-scsi
Argg, vger is driving me nuts!
----- Forwarded message from Christoph Hellwig <hch@lst.de> -----
Date: Mon, 21 Apr 2003 12:01:44 +0200
From: Christoph Hellwig <hch@lst.de>
Subject: [PATCH] drop dead 2.0 compat code in aic7xxx/79xx
To: gibbs@scsiguy.com
Cc: linux-scsi@vger.kernel.org
There's some 2.0-compat stuff in the aic drivers, but the most
fundamental parts (old error handling, old PCI code) are missing.
Drop the dead bits.
--- 1.29/drivers/scsi/aic7xxx/aic79xx_osm.c Tue Mar 25 19:12:23 2003
+++ edited/drivers/scsi/aic7xxx/aic79xx_osm.c Sun Apr 20 23:21:18 2003
@@ -67,12 +67,10 @@
#include <linux/unistd.h>
static int errno;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
/*
* Lock protecting manipulation of the ahd softc list.
*/
spinlock_t ahd_list_spinlock;
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
struct proc_dir_entry proc_scsi_aic79xx = {
===== drivers/scsi/aic7xxx/aic79xx_osm.h 1.22 vs edited =====
--- 1.22/drivers/scsi/aic7xxx/aic79xx_osm.h Tue Mar 25 19:12:23 2003
+++ edited/drivers/scsi/aic7xxx/aic79xx_osm.h Sun Apr 20 23:21:18 2003
@@ -283,7 +283,7 @@
/***************************** SMP support ************************************/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h>
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
+#else
#include <linux/smp.h>
#endif
@@ -532,9 +532,7 @@
TAILQ_HEAD(, ahd_linux_device) device_runq;
struct ahd_completeq completeq;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t spin_lock;
-#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct tasklet_struct runq_tasklet;
#endif
@@ -730,7 +728,6 @@
static __inline void ahd_list_lock(unsigned long *flags);
static __inline void ahd_list_unlock(unsigned long *flags);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
static __inline void
ahd_lockinit(struct ahd_softc *ahd)
{
@@ -818,63 +815,6 @@
spin_unlock_irqrestore(&ahd_list_spinlock, *flags);
}
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) */
-
-ahd_lockinit(struct ahd_softc *ahd)
-{
-}
-
-static __inline void
-ahd_lock(struct ahd_softc *ahd, unsigned long *flags)
-{
- save_flags(*flags);
- cli();
-}
-
-static __inline void
-ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
-{
- restore_flags(*flags);
-}
-
-ahd_done_lockinit(struct ahd_softc *ahd)
-{
-}
-
-static __inline void
-ahd_done_lock(struct ahd_softc *ahd, unsigned long *flags)
-{
- /*
- * The done lock is always held while
- * the ahd lock is held so blocking
- * interrupts again would have no effect.
- */
-}
-
-static __inline void
-ahd_done_unlock(struct ahd_softc *ahd, unsigned long *flags)
-{
-}
-
-static __inline void
-ahd_list_lockinit()
-{
-}
-
-static __inline void
-ahd_list_lock(unsigned long *flags)
-{
- save_flags(*flags);
- cli();
-}
-
-static __inline void
-ahd_list_unlock(unsigned long *flags)
-{
- restore_flags(*flags);
-}
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) */
-
/******************************* PCI Definitions ******************************/
/*
* PCIM_xxx: mask to locate subfield in register
@@ -945,15 +885,6 @@
ahd_power_state new_state);
/******************************* PCI Routines *********************************/
-/*
- * We need to use the bios32.h routines if we are kernel version 2.1.92 or less.
- */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
-#if defined(__sparc_v9__) || defined(__powerpc__)
-#error "PPC and Sparc platforms are only supported under 2.1.92 and above"
-#endif
-#include <linux/bios32.h>
-#endif
int ahd_linux_pci_init(void);
void ahd_linux_pci_exit(void);
--- 1.28/drivers/scsi/aic7xxx/aic7xxx_osm.c Sun Apr 20 17:14:29 2003
+++ edited/drivers/scsi/aic7xxx/aic7xxx_osm.c Sun Apr 20 23:21:18 2003
@@ -146,12 +146,10 @@
#include <linux/unistd.h>
static int errno;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
/*
* Lock protecting manipulation of the ahc softc list.
*/
spinlock_t ahc_list_spinlock;
-#endif
/*
* To generate the correct addresses for the controller to issue
===== drivers/scsi/aic7xxx/aic7xxx_osm.h 1.35 vs edited =====
--- 1.35/drivers/scsi/aic7xxx/aic7xxx_osm.h Sun Apr 20 17:14:29 2003
+++ edited/drivers/scsi/aic7xxx/aic7xxx_osm.h Sun Apr 20 23:21:18 2003
@@ -295,7 +295,7 @@
/***************************** SMP support ************************************/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
#include <linux/spinlock.h>
-#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
+#else
#include <linux/smp.h>
#endif
@@ -538,9 +538,7 @@
TAILQ_HEAD(, ahc_linux_device) device_runq;
struct ahc_completeq completeq;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t spin_lock;
-#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct tasklet_struct runq_tasklet;
#endif
@@ -699,7 +697,6 @@
static __inline void ahc_list_lock(unsigned long *flags);
static __inline void ahc_list_unlock(unsigned long *flags);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
static __inline void
ahc_lockinit(struct ahc_softc *ahc)
{
@@ -785,65 +782,6 @@
spin_unlock_irqrestore(&ahc_list_spinlock, *flags);
}
-#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,93) */
-
-static __inline void
-ahc_lockinit(struct ahc_softc *ahc)
-{
-}
-
-static __inline void
-ahc_lock(struct ahc_softc *ahc, unsigned long *flags)
-{
- save_flags(*flags);
- cli();
-}
-
-static __inline void
-ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
-{
- restore_flags(*flags);
-}
-
-static __inline void
-ahc_done_lockinit(struct ahc_softc *ahc)
-{
-}
-
-static __inline void
-ahc_done_lock(struct ahc_softc *ahc, unsigned long *flags)
-{
- /*
- * The done lock is always held while
- * the ahc lock is held so blocking
- * interrupts again would have no effect.
- */
-}
-
-static __inline void
-ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
-{
-}
-
-static __inline void
-ahc_list_lockinit()
-{
-}
-
-static __inline void
-ahc_list_lock(unsigned long *flags)
-{
- save_flags(*flags);
- cli();
-}
-
-static __inline void
-ahc_list_unlock(unsigned long *flags)
-{
- restore_flags(*flags);
-}
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) */
-
/******************************* PCI Definitions ******************************/
/*
* PCIM_xxx: mask to locate subfield in register
@@ -902,15 +840,6 @@
int aic7770_map_int(struct ahc_softc *ahc, u_int irq);
/******************************* PCI Routines *********************************/
-/*
- * We need to use the bios32.h routines if we are kernel version 2.1.92 or less.
- */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,1,92)
-#if defined(__sparc_v9__) || defined(__powerpc__)
-#error "PPC and Sparc platforms are only supported under 2.1.92 and above"
-#endif
-#include <linux/bios32.h>
-#endif
int ahc_linux_pci_init(void);
void ahc_linux_pci_exit(void);
----- End forwarded message -----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-21 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-21 10:04 [hch@lst.de: [PATCH] drop dead 2.0 compat code in CENSORED Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox