aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic7xxx_osm.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-05-16 12:52:06 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 16:54:36 -0400
commitdedd831081052028f35aaf924ea3d6c55109074f (patch)
tree518497bc7e5aa491bc932d50149ce96cae0b26c3 /drivers/scsi/aic7xxx/aic7xxx_osm.h
parentc06716fe1cea97749668c83e8374b453fbd00823 (diff)
[SCSI] aic7xxx: remove Linux 2.4 ifdefs
There's not much sense in sharing code anymore now that aic7xxx uses various transport class facilities. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.h')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.h89
1 files changed, 0 insertions, 89 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
index 6ea2bfb8820c..752022e4d4d4 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -281,12 +281,6 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
281/***************************** SMP support ************************************/ 281/***************************** SMP support ************************************/
282#include <linux/spinlock.h> 282#include <linux/spinlock.h>
283 283
284#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) || defined(SCSI_HAS_HOST_LOCK))
285#define AHC_SCSI_HAS_HOST_LOCK 1
286#else
287#define AHC_SCSI_HAS_HOST_LOCK 0
288#endif
289
290#define AIC7XXX_DRIVER_VERSION "6.2.36" 284#define AIC7XXX_DRIVER_VERSION "6.2.36"
291 285
292/**************************** Front End Queues ********************************/ 286/**************************** Front End Queues ********************************/
@@ -438,18 +432,7 @@ struct ahc_linux_target {
438 * manner and are allocated below 4GB, the number of S/G segments is 432 * manner and are allocated below 4GB, the number of S/G segments is
439 * unrestricted. 433 * unrestricted.
440 */ 434 */
441#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
442/*
443 * We dynamically adjust the number of segments in pre-2.5 kernels to
444 * avoid fragmentation issues in the SCSI mid-layer's private memory
445 * allocator. See aic7xxx_osm.c ahc_linux_size_nseg() for details.
446 */
447extern u_int ahc_linux_nseg;
448#define AHC_NSEG ahc_linux_nseg
449#define AHC_LINUX_MIN_NSEG 64
450#else
451#define AHC_NSEG 128 435#define AHC_NSEG 128
452#endif
453 436
454/* 437/*
455 * Per-SCB OSM storage. 438 * Per-SCB OSM storage.
@@ -607,17 +590,6 @@ static __inline void ahc_lockinit(struct ahc_softc *);
607static __inline void ahc_lock(struct ahc_softc *, unsigned long *flags); 590static __inline void ahc_lock(struct ahc_softc *, unsigned long *flags);
608static __inline void ahc_unlock(struct ahc_softc *, unsigned long *flags); 591static __inline void ahc_unlock(struct ahc_softc *, unsigned long *flags);
609 592
610/* Lock acquisition and release of the above lock in midlayer entry points. */
611static __inline void ahc_midlayer_entrypoint_lock(struct ahc_softc *,
612 unsigned long *flags);
613static __inline void ahc_midlayer_entrypoint_unlock(struct ahc_softc *,
614 unsigned long *flags);
615
616/* Lock held during command compeletion to the upper layer */
617static __inline void ahc_done_lockinit(struct ahc_softc *);
618static __inline void ahc_done_lock(struct ahc_softc *, unsigned long *flags);
619static __inline void ahc_done_unlock(struct ahc_softc *, unsigned long *flags);
620
621/* Lock held during ahc_list manipulation and ahc softc frees */ 593/* Lock held during ahc_list manipulation and ahc softc frees */
622extern spinlock_t ahc_list_spinlock; 594extern spinlock_t ahc_list_spinlock;
623static __inline void ahc_list_lockinit(void); 595static __inline void ahc_list_lockinit(void);
@@ -643,57 +615,6 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
643} 615}
644 616
645static __inline void 617static __inline void
646ahc_midlayer_entrypoint_lock(struct ahc_softc *ahc, unsigned long *flags)
647{
648 /*
649 * In 2.5.X and some 2.4.X versions, the midlayer takes our
650 * lock just before calling us, so we avoid locking again.
651 * For other kernel versions, the io_request_lock is taken
652 * just before our entry point is called. In this case, we
653 * trade the io_request_lock for our per-softc lock.
654 */
655#if AHC_SCSI_HAS_HOST_LOCK == 0
656 spin_unlock(&io_request_lock);
657 spin_lock(&ahc->platform_data->spin_lock);
658#endif
659}
660
661static __inline void
662ahc_midlayer_entrypoint_unlock(struct ahc_softc *ahc, unsigned long *flags)
663{
664#if AHC_SCSI_HAS_HOST_LOCK == 0
665 spin_unlock(&ahc->platform_data->spin_lock);
666 spin_lock(&io_request_lock);
667#endif
668}
669
670static __inline void
671ahc_done_lockinit(struct ahc_softc *ahc)
672{
673 /*
674 * In 2.5.X, our own lock is held during completions.
675 * In previous versions, the io_request_lock is used.
676 * In either case, we can't initialize this lock again.
677 */
678}
679
680static __inline void
681ahc_done_lock(struct ahc_softc *ahc, unsigned long *flags)
682{
683#if AHC_SCSI_HAS_HOST_LOCK == 0
684 spin_lock_irqsave(&io_request_lock, *flags);
685#endif
686}
687
688static __inline void
689ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
690{
691#if AHC_SCSI_HAS_HOST_LOCK == 0
692 spin_unlock_irqrestore(&io_request_lock, *flags);
693#endif
694}
695
696static __inline void
697ahc_list_lockinit(void) 618ahc_list_lockinit(void)
698{ 619{
699 spin_lock_init(&ahc_list_spinlock); 620 spin_lock_init(&ahc_list_spinlock);
@@ -759,12 +680,6 @@ typedef enum
759} ahc_power_state; 680} ahc_power_state;
760 681
761/**************************** VL/EISA Routines ********************************/ 682/**************************** VL/EISA Routines ********************************/
762#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) \
763 && (defined(__i386__) || defined(__alpha__)) \
764 && (!defined(CONFIG_EISA)))
765#define CONFIG_EISA
766#endif
767
768#ifdef CONFIG_EISA 683#ifdef CONFIG_EISA
769extern uint32_t aic7xxx_probe_eisa_vl; 684extern uint32_t aic7xxx_probe_eisa_vl;
770int ahc_linux_eisa_init(void); 685int ahc_linux_eisa_init(void);
@@ -880,12 +795,8 @@ ahc_flush_device_writes(struct ahc_softc *ahc)
880} 795}
881 796
882/**************************** Proc FS Support *********************************/ 797/**************************** Proc FS Support *********************************/
883#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
884int ahc_linux_proc_info(char *, char **, off_t, int, int, int);
885#else
886int ahc_linux_proc_info(struct Scsi_Host *, char *, char **, 798int ahc_linux_proc_info(struct Scsi_Host *, char *, char **,
887 off_t, int, int); 799 off_t, int, int);
888#endif
889 800
890/*************************** Domain Validation ********************************/ 801/*************************** Domain Validation ********************************/
891/*********************** Transaction Access Wrappers *************************/ 802/*********************** Transaction Access Wrappers *************************/