patch-2.4.21 linux-2.4.21/drivers/message/fusion/linux_compat.h
Next file: linux-2.4.21/drivers/message/fusion/lsi/mpi.h
Previous file: linux-2.4.21/drivers/message/fusion/isense.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
2003-06-13 07:51:34.000000000 -0700
- Orig file:
linux-2.4.20/drivers/message/fusion/linux_compat.h
- Orig date:
2002-11-28 15:53:13.000000000 -0800
diff -urN linux-2.4.20/drivers/message/fusion/linux_compat.h linux-2.4.21/drivers/message/fusion/linux_compat.h
@@ -246,12 +246,32 @@
#endif
/*
- * We use our new error handling code if the kernel version is 2.5.1 or newer.
+ * We use our new error handling code if the kernel version is 2.4.18 or newer.
*/
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
#define MPT_SCSI_USE_NEW_EH
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,41)
+#define mpt_work_struct work_struct
+#define MPT_INIT_WORK(_task, _func, _data) INIT_WORK(_task, _func, _data)
+#else
+#define mpt_work_struct tq_struct
+#define MPT_INIT_WORK(_task, _func, _data) \
+({ (_task)->sync = 0; \
+ (_task)->routine = (_func); \
+ (_task)->data = (void *) (_data); \
+})
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
+#define mptscsih_sync_irq(_irq) synchronize_irq(_irq)
+#else
+#define mptscsih_sync_irq(_irq) synchronize_irq()
+#endif
+
+
+
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif /* _LINUX_COMPAT_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)