Commit 59b52f22 authored by Justin T. Gibbs's avatar Justin T. Gibbs

aic7xxx_osm.h, aic7xxx_osm.c, aic79xx_osm.h, aic79xx_osm.c:

  Remove pre-2.2.X kernel support. 
parent 955cf944
/* /*
* Adaptec AIC79xx device driver for Linux. * Adaptec AIC79xx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#155 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#156 $
* *
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Copyright (c) 1994-2000 Justin T. Gibbs. * Copyright (c) 1994-2000 Justin T. Gibbs.
...@@ -67,12 +67,10 @@ ...@@ -67,12 +67,10 @@
#include <linux/unistd.h> #include <linux/unistd.h>
static int errno; static int errno;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
/* /*
* Lock protecting manipulation of the ahd softc list. * Lock protecting manipulation of the ahd softc list.
*/ */
spinlock_t ahd_list_spinlock; spinlock_t ahd_list_spinlock;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
struct proc_dir_entry proc_scsi_aic79xx = { struct proc_dir_entry proc_scsi_aic79xx = {
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#126 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#128 $
* *
*/ */
#ifndef _AIC79XX_LINUX_H_ #ifndef _AIC79XX_LINUX_H_
...@@ -543,9 +543,7 @@ struct ahd_platform_data { ...@@ -543,9 +543,7 @@ struct ahd_platform_data {
TAILQ_HEAD(, ahd_linux_device) device_runq; TAILQ_HEAD(, ahd_linux_device) device_runq;
struct ahd_completeq completeq; struct ahd_completeq completeq;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t spin_lock; spinlock_t spin_lock;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct tasklet_struct runq_tasklet; struct tasklet_struct runq_tasklet;
#endif #endif
...@@ -741,7 +739,6 @@ static __inline void ahd_list_lockinit(void); ...@@ -741,7 +739,6 @@ static __inline void ahd_list_lockinit(void);
static __inline void ahd_list_lock(unsigned long *flags); static __inline void ahd_list_lock(unsigned long *flags);
static __inline void ahd_list_unlock(unsigned long *flags); static __inline void ahd_list_unlock(unsigned long *flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
static __inline void static __inline void
ahd_lockinit(struct ahd_softc *ahd) ahd_lockinit(struct ahd_softc *ahd)
{ {
...@@ -829,63 +826,6 @@ ahd_list_unlock(unsigned long *flags) ...@@ -829,63 +826,6 @@ ahd_list_unlock(unsigned long *flags)
spin_unlock_irqrestore(&ahd_list_spinlock, *flags); 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 ******************************/ /******************************* PCI Definitions ******************************/
/* /*
* PCIM_xxx: mask to locate subfield in register * PCIM_xxx: mask to locate subfield in register
...@@ -956,16 +896,6 @@ void ahd_power_state_change(struct ahd_softc *ahd, ...@@ -956,16 +896,6 @@ void ahd_power_state_change(struct ahd_softc *ahd,
ahd_power_state new_state); ahd_power_state new_state);
/******************************* PCI Routines *********************************/ /******************************* 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); int ahd_linux_pci_init(void);
void ahd_linux_pci_exit(void); void ahd_linux_pci_exit(void);
int ahd_pci_map_registers(struct ahd_softc *ahd); int ahd_pci_map_registers(struct ahd_softc *ahd);
......
/* /*
* Adaptec AIC7xxx device driver for Linux. * Adaptec AIC7xxx device driver for Linux.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#216 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#217 $
* *
* Copyright (c) 1994 John Aycock * Copyright (c) 1994 John Aycock
* The University of Calgary Department of Computer Science. * The University of Calgary Department of Computer Science.
...@@ -146,12 +146,10 @@ ...@@ -146,12 +146,10 @@
#include <linux/unistd.h> #include <linux/unistd.h>
static int errno; static int errno;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
/* /*
* Lock protecting manipulation of the ahc softc list. * Lock protecting manipulation of the ahc softc list.
*/ */
spinlock_t ahc_list_spinlock; spinlock_t ahc_list_spinlock;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/* For dynamic sglist size calculation. */ /* For dynamic sglist size calculation. */
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES. * POSSIBILITY OF SUCH DAMAGES.
* *
* $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#135 $ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#138 $
* *
*/ */
#ifndef _AIC7XXX_LINUX_H_ #ifndef _AIC7XXX_LINUX_H_
...@@ -549,9 +549,7 @@ struct ahc_platform_data { ...@@ -549,9 +549,7 @@ struct ahc_platform_data {
TAILQ_HEAD(, ahc_linux_device) device_runq; TAILQ_HEAD(, ahc_linux_device) device_runq;
struct ahc_completeq completeq; struct ahc_completeq completeq;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
spinlock_t spin_lock; spinlock_t spin_lock;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
struct tasklet_struct runq_tasklet; struct tasklet_struct runq_tasklet;
#endif #endif
...@@ -710,7 +708,6 @@ static __inline void ahc_list_lockinit(void); ...@@ -710,7 +708,6 @@ static __inline void ahc_list_lockinit(void);
static __inline void ahc_list_lock(unsigned long *flags); static __inline void ahc_list_lock(unsigned long *flags);
static __inline void ahc_list_unlock(unsigned long *flags); static __inline void ahc_list_unlock(unsigned long *flags);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
static __inline void static __inline void
ahc_lockinit(struct ahc_softc *ahc) ahc_lockinit(struct ahc_softc *ahc)
{ {
...@@ -796,65 +793,6 @@ ahc_list_unlock(unsigned long *flags) ...@@ -796,65 +793,6 @@ ahc_list_unlock(unsigned long *flags)
spin_unlock_irqrestore(&ahc_list_spinlock, *flags); 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 ******************************/ /******************************* PCI Definitions ******************************/
/* /*
* PCIM_xxx: mask to locate subfield in register * PCIM_xxx: mask to locate subfield in register
...@@ -913,16 +851,6 @@ int aic7770_map_registers(struct ahc_softc *ahc, ...@@ -913,16 +851,6 @@ int aic7770_map_registers(struct ahc_softc *ahc,
int aic7770_map_int(struct ahc_softc *ahc, u_int irq); int aic7770_map_int(struct ahc_softc *ahc, u_int irq);
/******************************* PCI Routines *********************************/ /******************************* 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); int ahc_linux_pci_init(void);
void ahc_linux_pci_exit(void); void ahc_linux_pci_exit(void);
int ahc_pci_map_registers(struct ahc_softc *ahc); int ahc_pci_map_registers(struct ahc_softc *ahc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment