diff -Naurp -X /home/jbarnes/dontdiff 050-max-nr-memblks-increase.patch/drivers/ide/ide-disk.c 080-ide-simulator-hacks.patch/drivers/ide/ide-disk.c
--- 050-max-nr-memblks-increase.patch/drivers/ide/ide-disk.c	Tue Jan 20 14:22:05 2004
+++ 080-ide-simulator-hacks.patch/drivers/ide/ide-disk.c	Tue Jan 20 14:24:46 2004
@@ -68,6 +68,9 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/div64.h>
+#ifdef CONFIG_IA64_SGI_SIM
+#include <asm/sn/simulator.h>
+#endif
 
 /* FIXME: some day we shouldn't need to look in here! */
 
@@ -941,6 +944,12 @@ static unsigned long idedisk_read_native
 	ide_task_t args;
 	unsigned long addr = 0;
 
+#ifdef CONFIG_IA64_SGI_SIM
+	if (IS_RUNNING_ON_SIMULATOR() && !(drive->id->command_set_1 & 0x0400) &&
+	    !(drive->id->cfs_enable_2 & 0x0100))
+		return addr;
+#endif
+
 	/* Create IDE/ATA command request structure */
 	memset(&args, 0, sizeof(ide_task_t));
 	args.tfRegister[IDE_SELECT_OFFSET]	= 0x40;
diff -Naurp -X /home/jbarnes/dontdiff 050-max-nr-memblks-increase.patch/drivers/ide/ide-iops.c 080-ide-simulator-hacks.patch/drivers/ide/ide-iops.c
--- 050-max-nr-memblks-increase.patch/drivers/ide/ide-iops.c	Thu Jan  8 22:59:26 2004
+++ 080-ide-simulator-hacks.patch/drivers/ide/ide-iops.c	Tue Jan 20 14:24:46 2004
@@ -29,6 +29,9 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
+#ifdef CONFIG_IA64_SGI_SN
+#include <asm/sn/simulator.h>
+#endif
 
 /*
  *	IDE operator we assign to an unplugged device so that
@@ -1066,7 +1069,12 @@ void ide_execute_command(ide_drive_t *dr
 	ide_hwif_t *hwif = HWIF(drive);
 	
 	spin_lock_irqsave(&ide_lock, flags);
-	
+
+#ifdef CONFIG_IA64_SGI_SN_SIM
+	        if (IS_RUNNING_ON_SIMULATOR())
+			timeout = 2;
+#endif
+
 	if(hwgroup->handler)
 		BUG();
 	hwgroup->handler	= handler;
diff -Naurp -X /home/jbarnes/dontdiff 050-max-nr-memblks-increase.patch/drivers/ide/ide.c 080-ide-simulator-hacks.patch/drivers/ide/ide.c
--- 050-max-nr-memblks-increase.patch/drivers/ide/ide.c	Tue Jan 20 14:22:05 2004
+++ 080-ide-simulator-hacks.patch/drivers/ide/ide.c	Tue Jan 20 14:24:46 2004
@@ -160,6 +160,10 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/bitops.h>
+#ifdef CONFIG_IA64_SGI_SN
+#include <asm/sn/simulator.h>
+#endif
+
 
 
 /* default maximum number of failures */
@@ -1448,6 +1452,10 @@ void ide_add_generic_settings (ide_drive
 void ide_delay_50ms (void)
 {
 #ifndef CONFIG_BLK_DEV_IDECS
+#ifdef CONFIG_IA64_SGI_SN_SIM
+        SIMULATOR_SLEEP();
+	return;
+#endif
 	mdelay(50);
 #else
 	__set_current_state(TASK_UNINTERRUPTIBLE);
