ia64/xen-unstable

changeset 960:835dc1d3ad23

bitkeeper revision 1.615 (3fbc9188pfX4YYzNRqNTu-qQSJS7XA)

aic79xx_osm.h, aic79xx_osm.c, aic79xx_host.h, aic79xx_core.c, Makefile:
Add aic79xx SCSI support.
author kaf24@scramble.cl.cam.ac.uk
date Thu Nov 20 10:03:52 2003 +0000 (2003-11-20)
parents 461fc928a4bf
children 31e50e01f987
files xen/drivers/scsi/aic7xxx/Makefile xen/drivers/scsi/aic7xxx/aic79xx_core.c xen/drivers/scsi/aic7xxx/aic79xx_host.h xen/drivers/scsi/aic7xxx/aic79xx_osm.c xen/drivers/scsi/aic7xxx/aic79xx_osm.h
line diff
     1.1 --- a/xen/drivers/scsi/aic7xxx/Makefile	Wed Nov 19 23:06:31 2003 +0000
     1.2 +++ b/xen/drivers/scsi/aic7xxx/Makefile	Thu Nov 20 10:03:52 2003 +0000
     1.3 @@ -35,9 +35,14 @@ obj-aic7xxx += aic7xxx_pci.o
     1.4  #obj-aic79xx = aic79xx_osm.o 
     1.5  #obj-aic79xx += aic79xx_proc.o
     1.6  #obj-aic79xx += aic79xx_osm_pci.o
     1.7 +obj-aic7xxx += aic79xx_osm.o 
     1.8 +obj-aic7xxx += aic79xx_proc.o
     1.9 +obj-aic7xxx += aic79xx_osm_pci.o
    1.10  # Core Files
    1.11  #obj-aic79xx += aic79xx_core.o
    1.12  #obj-aic79xx += aic79xx_pci.o
    1.13 +obj-aic7xxx += aic79xx_core.o
    1.14 +obj-aic7xxx += aic79xx_pci.o
    1.15  
    1.16  default: aic7xxx.o
    1.17  
     2.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_core.c	Wed Nov 19 23:06:31 2003 +0000
     2.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_core.c	Thu Nov 20 10:03:52 2003 +0000
     2.3 @@ -6868,7 +6868,8 @@ ahd_calc_residual(struct ahd_softc *ahd,
     2.4  	struct initiator_status *spkt;
     2.5  	uint32_t sgptr;
     2.6  	uint32_t resid_sgptr;
     2.7 -	uint32_t resid;
     2.8 +/* SAE */
     2.9 +	uint32_t resid = 0;
    2.10  
    2.11  	/*
    2.12  	 * 5 cases.
     3.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_host.h	Wed Nov 19 23:06:31 2003 +0000
     3.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_host.h	Thu Nov 20 10:03:52 2003 +0000
     3.3 @@ -62,11 +62,13 @@ int		 ahd_linux_abort(Scsi_Cmnd *);
     3.4   * Scsi_Host_Template (see hosts.h) for AIC-79xx - some fields
     3.5   * to do with card config are filled in after the card is detected.
     3.6   */
     3.7 +/* SAE:
     3.8 +	proc_dir: NULL,						\
     3.9 +	proc_info: ahd_linux_proc_info,				\
    3.10 +*/
    3.11  #define AIC79XX	{						\
    3.12  	next: NULL,						\
    3.13  	module: NULL,						\
    3.14 -	proc_dir: NULL,						\
    3.15 -	proc_info: ahd_linux_proc_info,				\
    3.16  	name: NULL,						\
    3.17  	detect: ahd_linux_detect,				\
    3.18  	release: ahd_linux_release,				\
     4.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.c	Wed Nov 19 23:06:31 2003 +0000
     4.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.c	Thu Nov 20 10:03:52 2003 +0000
     4.3 @@ -52,12 +52,12 @@
     4.4  #include "aic79xx_inline.h"
     4.5  
     4.6  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
     4.7 -#include <linux/init.h>		/* __setup */
     4.8 +#include <xeno/init.h>		/* __setup */
     4.9  #endif
    4.10  
    4.11  #include "../sd.h"		/* For geometry detection */
    4.12  
    4.13 -#include <linux/mm.h>		/* For fetching system memory size */
    4.14 +#include <xeno/mm.h>		/* For fetching system memory size */
    4.15  
    4.16  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
    4.17  /*
    4.18 @@ -66,6 +66,8 @@
    4.19  spinlock_t ahd_list_spinlock;
    4.20  #endif
    4.21  
    4.22 +/* SAE: */
    4.23 +/*
    4.24  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
    4.25  struct proc_dir_entry proc_scsi_aic79xx = {
    4.26  	PROC_SCSI_AIC79XX, 7, "aic79xx",
    4.27 @@ -73,6 +75,7 @@ struct proc_dir_entry proc_scsi_aic79xx 
    4.28  	0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
    4.29  };
    4.30  #endif
    4.31 +*/
    4.32  
    4.33  /*
    4.34   * Set this to the delay in seconds after SCSI bus reset.
    4.35 @@ -83,7 +86,7 @@ struct proc_dir_entry proc_scsi_aic79xx 
    4.36  #ifdef CONFIG_AIC79XX_RESET_DELAY_MS
    4.37  #define AIC79XX_RESET_DELAY CONFIG_AIC79XX_RESET_DELAY_MS
    4.38  #else
    4.39 -#define AIC79XX_RESET_DELAY 5000
    4.40 +#define AIC79XX_RESET_DELAY 500
    4.41  #endif
    4.42  
    4.43  /*
    4.44 @@ -226,11 +229,13 @@ static uint16_t aic79xx_rd_strm_info[] =
    4.45  void
    4.46  ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
    4.47  {
    4.48 -	printk("(scsi%d:%c:%d:%d): ",
    4.49 +/* SAE: */
    4.50 +	printf("(scsi%d:%c:%d:%d): ",
    4.51  	       ahd->platform_data->host->host_no,
    4.52  	       scb != NULL ? SCB_GET_CHANNEL(ahd, scb) : 'X',
    4.53  	       scb != NULL ? SCB_GET_TARGET(ahd, scb) : -1,
    4.54  	       scb != NULL ? SCB_GET_LUN(scb) : -1);
    4.55 +
    4.56  }
    4.57  
    4.58  /*
    4.59 @@ -336,31 +341,30 @@ MODULE_DESCRIPTION("Adaptec Aic77XX/78XX
    4.60  MODULE_LICENSE("Dual BSD/GPL");
    4.61  #endif
    4.62  MODULE_PARM(aic79xx, "s");
    4.63 -MODULE_PARM_DESC(aic79xx, "period delimited, options string.
    4.64 -	verbose			Enable verbose/diagnostic logging
    4.65 -	debug			Bitmask of debug values to enable
    4.66 -	no_reset		Supress initial bus resets
    4.67 -	extended		Enable extended geometry on all controllers
    4.68 -	periodic_otag		Send an ordered tagged transaction periodically
    4.69 -				to prevent tag starvation.  This may be
    4.70 -				required by some older disk drives/RAID arrays. 
    4.71 -	reverse_scan		Sort PCI devices highest Bus/Slot to lowest
    4.72 -	tag_info:<tag_str>	Set per-target tag depth
    4.73 -	rd_strm:<rd_strm_masks> Set per-target read streaming setting.
    4.74 -	seltime:<int>		Selection Timeout(0/256ms,1/128ms,2/64ms,3/32ms)
    4.75 -
    4.76 -	Sample /etc/modules.conf line:
    4.77 -		Enable verbose logging
    4.78 -		Set tag depth on Controller 2/Target 2 to 10 tags
    4.79 -		Shorten the selection timeout to 128ms from its default of 256
    4.80 -
    4.81 -	options aic79xx='\"verbose.tag_info:{{}.{}.{..10}}.seltime:1\"'
    4.82 -
    4.83 -	Sample /etc/modules.conf line:
    4.84 -		Change Read Streaming for Controller's 2 and 3
    4.85 -
    4.86 -	options aic79xx='\"rd_strm:{..0xFFF0.0xC0F0}\"'
    4.87 -");
    4.88 +MODULE_PARM_DESC(aic79xx, "period delimited, options string.\n"
    4.89 +	"verbose			Enable verbose/diagnostic logging\n"
    4.90 +	"debug			Bitmask of debug values to enable\n"
    4.91 +	"no_reset		Supress initial bus resets\n"
    4.92 +	"extended		Enable extended geometry on all controllers\n"
    4.93 +	"periodic_otag		Send an ordered tagged transaction periodically\n"
    4.94 +				"to prevent tag starvation.  This may be\n"
    4.95 +				"required by some older disk drives/RAID arrays. \n"
    4.96 +	"reverse_scan		Sort PCI devices highest Bus/Slot to lowest\n"
    4.97 +	"tag_info:<tag_str>	Set per-target tag depth\n"
    4.98 +	"rd_strm:<rd_strm_masks> Set per-target read streaming setting.\n"
    4.99 +	"seltime:<int>		Selection Timeout(0/256ms,1/128ms,2/64ms,3/32ms)\n"
   4.100 +"\n"
   4.101 +	"Sample /etc/modules.conf line:\n"
   4.102 +		"Enable verbose logging\n"
   4.103 +		"Set tag depth on Controller 2/Target 2 to 10 tags\n"
   4.104 +		"Shorten the selection timeout to 128ms from its default of 256\n"
   4.105 +"\n"
   4.106 +	"options aic79xx='\"verbose.tag_info:{{}.{}.{..10}}.seltime:1\"'\n"
   4.107 +"\n"
   4.108 +	"Sample /etc/modules.conf line:\n"
   4.109 +		"Change Read Streaming for Controller's 2 and 3\n"
   4.110 +"\n"
   4.111 +	"options aic79xx='\"rd_strm:{..0xFFF0.0xC0F0}\"'\n");
   4.112  #endif
   4.113  
   4.114  static void ahd_linux_handle_scsi_status(struct ahd_softc *,
   4.115 @@ -369,10 +373,12 @@ static void ahd_linux_handle_scsi_status
   4.116  static void ahd_linux_filter_command(struct ahd_softc*, Scsi_Cmnd*,
   4.117  				     struct scb*);
   4.118  static void ahd_linux_dev_timed_unfreeze(u_long arg);
   4.119 -#if NO_YET
   4.120 +/* SAE */
   4.121 +#if XENO_KILLED
   4.122  static void ahd_linux_sem_timeout(u_long arg);
   4.123 +#endif
   4.124  static int  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
   4.125 -#endif 
   4.126 +
   4.127  static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
   4.128  static void ahd_linux_select_queue_depth(struct Scsi_Host *host,
   4.129  					 Scsi_Device *scsi_devs);
   4.130 @@ -395,6 +401,8 @@ static void ahd_linux_setup_tag_info(cha
   4.131  static void ahd_linux_setup_rd_strm_info(char *p, char *end);
   4.132  static int ahd_linux_next_unit(void);
   4.133  static void ahd_runq_tasklet(unsigned long data);
   4.134 +/* SAE: .... */
   4.135 +struct notifier_block;
   4.136  static int ahd_linux_halt(struct notifier_block *nb, u_long event, void *buf);
   4.137  
   4.138  static __inline struct ahd_linux_device*
   4.139 @@ -640,12 +648,14 @@ ahd_runq_tasklet(unsigned long data)
   4.140  }
   4.141  
   4.142  /************************ Shutdown/halt/reboot hook ***************************/
   4.143 -#include <linux/notifier.h>
   4.144 -#include <linux/reboot.h>
   4.145 -
   4.146 +#include <xeno/notifier.h>
   4.147 +#include <xeno/reboot.h>
   4.148 +/* SAE: */
   4.149 +/*
   4.150  static struct notifier_block ahd_linux_notifier = {
   4.151  	ahd_linux_halt, NULL, 0
   4.152  };
   4.153 +*/
   4.154  
   4.155  static int ahd_linux_halt(struct notifier_block *nb, u_long event, void *buf)
   4.156  {
   4.157 @@ -1184,11 +1194,14 @@ ahd_linux_register_host(struct ahd_softc
   4.158  
   4.159  uint64_t
   4.160  ahd_linux_get_memsize()
   4.161 -{
   4.162 +{/*
   4.163  	struct sysinfo si;
   4.164  
   4.165  	si_meminfo(&si);
   4.166  	return (si.totalram << PAGE_SHIFT);
   4.167 +*/
   4.168 +	printf("SAE: aic79xx_osm: get_memsize\n");
   4.169 +	return 0;
   4.170  }
   4.171  
   4.172  /*
   4.173 @@ -1264,6 +1277,7 @@ ahd_linux_initialize_scsi_bus(struct ahd
   4.174  	}
   4.175  	/* Give the bus some time to recover */
   4.176  	if ((ahd->flags & AHD_RESET_BUS_A) != 0) {
   4.177 +/* SAE: No timers
   4.178  		ahd_freeze_simq(ahd);
   4.179  		init_timer(&ahd->platform_data->reset_timer);
   4.180  		ahd->platform_data->reset_timer.data = (u_long)ahd;
   4.181 @@ -1272,6 +1286,8 @@ ahd_linux_initialize_scsi_bus(struct ahd
   4.182  		ahd->platform_data->reset_timer.function =
   4.183  		    (ahd_linux_callback_t *)ahd_release_simq;
   4.184  		add_timer(&ahd->platform_data->reset_timer);
   4.185 +*/
   4.186 +		mdelay(AIC79XX_RESET_DELAY);
   4.187  	}
   4.188  }
   4.189  
   4.190 @@ -1289,19 +1305,24 @@ ahd_platform_alloc(struct ahd_softc *ahd
   4.191  	ahd->platform_data->hw_dma_mask = 0xFFFFFFFF;
   4.192  	ahd_lockinit(ahd);
   4.193  	ahd_done_lockinit(ahd);
   4.194 +/* SAE */
   4.195 +#if XENO_KILLED
   4.196  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
   4.197  	init_MUTEX_LOCKED(&ahd->platform_data->eh_sem);
   4.198  #else
   4.199  	ahd->platform_data->eh_sem = MUTEX_LOCKED;
   4.200  #endif
   4.201 +#endif
   4.202  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
   4.203  	tasklet_init(&ahd->platform_data->runq_tasklet, ahd_runq_tasklet,
   4.204  		     (unsigned long)ahd);
   4.205  #endif
   4.206  	ahd->seltime = (aic79xx_seltime & 0x3) << 4;
   4.207 -	
   4.208 +/* SAE */
   4.209 +#if XENO_KILLED
   4.210  	if (TAILQ_EMPTY(&ahd_tailq))
   4.211  		register_reboot_notifier(&ahd_linux_notifier);
   4.212 +#endif
   4.213  	return (0);
   4.214  }
   4.215  
   4.216 @@ -1342,7 +1363,9 @@ ahd_platform_free(struct ahd_softc *ahd)
   4.217  		free(ahd->platform_data, M_DEVBUF);
   4.218  	}
   4.219  	if (TAILQ_EMPTY(&ahd_tailq)) {
   4.220 +/* SAE:
   4.221  		unregister_reboot_notifier(&ahd_linux_notifier);
   4.222 +*/
   4.223  #ifdef CONFIG_PCI
   4.224  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
   4.225  		pci_unregister_driver(&aic79xx_pci_driver);
   4.226 @@ -2082,7 +2105,10 @@ ahd_done(struct ahd_softc *ahd, struct s
   4.227  
   4.228  	if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
   4.229  		printf("Recovery SCB completes\n");
   4.230 +/* SAE: */
   4.231 +#if XENO_KILLED
   4.232  		up(&ahd->platform_data->eh_sem);
   4.233 +#endif
   4.234  	}
   4.235  
   4.236  	ahd_free_scb(ahd, scb);
   4.237 @@ -2422,7 +2448,8 @@ ahd_release_simq(struct ahd_softc *ahd)
   4.238  	}
   4.239  }
   4.240  
   4.241 -#if NOT_YET
   4.242 +/* SAE */
   4.243 +#if XENO_KILLED
   4.244  static void
   4.245  ahd_linux_sem_timeout(u_long arg)
   4.246  {
   4.247 @@ -2431,6 +2458,7 @@ ahd_linux_sem_timeout(u_long arg)
   4.248  	sem = (struct semaphore *)arg;
   4.249  	up(sem);
   4.250  }
   4.251 +#endif
   4.252  
   4.253  static int
   4.254  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
   4.255 @@ -2672,6 +2700,10 @@ done:
   4.256  	if (paused)
   4.257  		ahd_unpause(ahd);
   4.258  	if (wait) {
   4.259 +/* SAE */
   4.260 +		printf("SAE: aic79xxx: recovery failed\n");
   4.261 +		retval=FAILED;
   4.262 +#if XENO_KILLED
   4.263  		struct timer_list timer;
   4.264  		int ret;
   4.265  
   4.266 @@ -2690,6 +2722,7 @@ done:
   4.267  			retval = FAILED;
   4.268  		}
   4.269  		ahd_lock(ahd, &s);
   4.270 +#endif
   4.271  	}
   4.272  	acmd = TAILQ_FIRST(&ahd->platform_data->completeq);
   4.273  	TAILQ_INIT(&ahd->platform_data->completeq);
   4.274 @@ -2700,7 +2733,6 @@ done:
   4.275  	spin_lock_irq(&io_request_lock);
   4.276  	return (retval);
   4.277  }
   4.278 -#endif
   4.279  
   4.280  static void
   4.281  ahd_linux_dev_timed_unfreeze(u_long arg)
   4.282 @@ -2823,12 +2855,20 @@ ahd_linux_biosparam(Disk *disk, kdev_t d
   4.283  	int	heads;
   4.284  	int	sectors;
   4.285  	int	cylinders;
   4.286 +/* SAE */
   4.287 +#if XENO_KILLED
   4.288  	int	ret;
   4.289 +#endif
   4.290  	int	extended;
   4.291  	struct	ahd_softc *ahd;
   4.292 +/* SAE */
   4.293 +#if XENO_KILLED
   4.294  	struct	buffer_head *bh;
   4.295 +#endif
   4.296  
   4.297  	ahd = *((struct ahd_softc **)disk->device->host->hostdata);
   4.298 +/* SAE: */
   4.299 +#if XENO_KILLED
   4.300  	bh = bread(MKDEV(MAJOR(dev), MINOR(dev) & ~0xf), 0, 1024);
   4.301  
   4.302  	if (bh) {
   4.303 @@ -2838,6 +2878,7 @@ ahd_linux_biosparam(Disk *disk, kdev_t d
   4.304  		if (ret != -1)
   4.305  			return (ret);
   4.306  	}
   4.307 +#endif
   4.308  	heads = 64;
   4.309  	sectors = 32;
   4.310  	cylinders = disk->capacity / (heads * sectors);
   4.311 @@ -2923,5 +2964,5 @@ ahd_platform_dump_card_state(struct ahd_
   4.312  #if defined(MODULE) || LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
   4.313  static Scsi_Host_Template driver_template = AIC79XX;
   4.314  Scsi_Host_Template *aic79xx_driver_template = &driver_template;
   4.315 -#include "../scsi_module.c"
   4.316 +#include "../scsi_module.c.inc"
   4.317  #endif
     5.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.h	Wed Nov 19 23:06:31 2003 +0000
     5.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.h	Thu Nov 20 10:03:52 2003 +0000
     5.3 @@ -42,29 +42,35 @@
     5.4  #ifndef _AIC79XX_LINUX_H_
     5.5  #define _AIC79XX_LINUX_H_
     5.6  
     5.7 -#include <linux/types.h>
     5.8 -#include <linux/blk.h>
     5.9 -#include <linux/blkdev.h>
    5.10 -#include <linux/delay.h>
    5.11 -#include <linux/ioport.h>
    5.12 -#include <linux/pci.h>
    5.13 -#include <linux/version.h>
    5.14 +#include <xeno/types.h>
    5.15 +#include <xeno/blk.h>
    5.16 +#include <xeno/blkdev.h>
    5.17 +#include <xeno/delay.h>
    5.18 +#include <xeno/ioport.h>
    5.19 +#include <xeno/pci.h>
    5.20 +/* SAE */
    5.21 +#if XENO_KILLED
    5.22 +#include <xeno/version.h>
    5.23 +#endif
    5.24  #ifndef AHD_MODVERSION_FILE
    5.25  #define __NO_VERSION__
    5.26  #endif
    5.27 -#include <linux/module.h>
    5.28 +#include <xeno/module.h>
    5.29  #include <asm/byteorder.h>
    5.30  
    5.31  #ifndef KERNEL_VERSION
    5.32  #define KERNEL_VERSION(x,y,z) (((x)<<16)+((y)<<8)+(z))
    5.33  #endif
    5.34  
    5.35 +/* SAE */
    5.36 +#define LINUX_VERSION_CODE KERNEL_VERSION(2,4,0)
    5.37 +
    5.38  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
    5.39 -#include <linux/interrupt.h> /* For tasklet support. */
    5.40 -#include <linux/config.h>
    5.41 -#include <linux/slab.h>
    5.42 +#include <xeno/interrupt.h> /* For tasklet support. */
    5.43 +#include <xeno/config.h>
    5.44 +#include <xeno/slab.h>
    5.45  #else
    5.46 -#include <linux/malloc.h>
    5.47 +#include <xeno/malloc.h>
    5.48  #endif
    5.49  
    5.50  /* Core SCSI definitions */
    5.51 @@ -134,17 +140,23 @@ typedef Scsi_Cmnd      *ahd_io_ctx_t;
    5.52  #endif
    5.53  #endif /* BYTE_ORDER */
    5.54  
    5.55 +/* SAE: */
    5.56 +#define off_t int
    5.57 +
    5.58  /************************* Configuration Data *********************************/
    5.59  extern int aic79xx_detect_complete;
    5.60  extern Scsi_Host_Template* aic79xx_driver_template;
    5.61  
    5.62  /***************************** Bus Space/DMA **********************************/
    5.63 -
    5.64 +/* SAE */
    5.65 +typedef dma_addr_t bus_addr_t;
    5.66 +#if XENO_KILLED
    5.67  #if LINUX_VERSION_CODE > KERNEL_VERSION(2,2,17)
    5.68  typedef dma_addr_t bus_addr_t;
    5.69  #else
    5.70  typedef uint32_t bus_addr_t;
    5.71  #endif
    5.72 +#endif
    5.73  typedef uint32_t bus_size_t;
    5.74  
    5.75  typedef enum {
    5.76 @@ -426,11 +438,15 @@ ahd_timer_reset(ahd_timer_t *timer, int 
    5.77  }
    5.78  
    5.79  /***************************** SMP support ************************************/
    5.80 +/* SAE */
    5.81 +#include <xeno/spinlock.h>
    5.82 +/*
    5.83  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,17)
    5.84 -#include <linux/spinlock.h>
    5.85 +#include <xeno/spinlock.h>
    5.86  #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93)
    5.87 -#include <linux/smp.h>
    5.88 +#include <xeno/smp.h>
    5.89  #endif
    5.90 +*/
    5.91  
    5.92  #define AIC79XX_DRIVER_VERSION  "1.0.0"
    5.93  
    5.94 @@ -591,9 +607,13 @@ struct scb_platform_data {
    5.95  	struct ahd_linux_device	*dev;
    5.96  	bus_addr_t		 buf_busaddr;
    5.97  	uint32_t		 xfer_len;
    5.98 +/* SAE */
    5.99 +	uint32_t		 resid;		/* Transfer residual */
   5.100 +#if XENO_KILLED
   5.101  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
   5.102  	uint32_t		 resid;		/* Transfer residual */
   5.103  #endif
   5.104 +#endif
   5.105  };
   5.106  
   5.107  /*
   5.108 @@ -610,16 +630,23 @@ struct ahd_platform_data {
   5.109  	struct ahd_linux_target *targets[AHD_NUM_TARGETS]; 
   5.110  	TAILQ_HEAD(, ahd_linux_device) device_runq;
   5.111  	struct ahd_completeq	 completeq;
   5.112 -
   5.113 +/* SAE */
   5.114 +	spinlock_t		 spin_lock;
   5.115 +	struct tasklet_struct	 runq_tasklet;
   5.116 +#if XENO_KILLED
   5.117  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
   5.118  	spinlock_t		 spin_lock;
   5.119  #endif
   5.120  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
   5.121  	struct tasklet_struct	 runq_tasklet;
   5.122  #endif
   5.123 +#endif
   5.124  	u_int			 qfrozen;
   5.125  	struct timer_list	 reset_timer;
   5.126 +/* SAE: No semaphores */
   5.127 +#if XENO_KILLED
   5.128  	struct semaphore	 eh_sem;
   5.129 +#endif
   5.130  	struct Scsi_Host        *host;		/* pointer to scsi host */
   5.131  #define AHD_LINUX_NOIRQ	((uint32_t)~0)
   5.132  	uint32_t		 irq;		/* IRQ for this adapter */
   5.133 @@ -988,7 +1015,7 @@ void ahd_power_state_change(struct ahd_s
   5.134  #if defined(__sparc_v9__) || defined(__powerpc__)
   5.135  #error "PPC and Sparc platforms are only support under 2.1.92 and above"
   5.136  #endif
   5.137 -#include <linux/bios32.h>
   5.138 +#include <xeno/bios32.h>
   5.139  #endif
   5.140  
   5.141  int			 ahd_linux_pci_probe(Scsi_Host_Template *);