@@ -25,6 +25,7 @@
#include <linux/types.h>
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/reboot.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/byteorder.h>
@@ -351,6 +352,7 @@ struct st_card_info {
u16 sts_count;
};
+static int isRestart;
static int msi;
module_param(msi, int, 0);
MODULE_PARM_DESC(msi, "Enable Message Signaled Interrupts(0=off, 1=on)");
@@ -372,6 +374,14 @@ MODULE_DESCRIPTION("Promise Technology SuperTrak EX
Controllers");
MODULE_LICENSE("GPL");
MODULE_VERSION(ST_DRIVER_VERSION);
+static int stex_reboot_callback(struct notifier_block *self,
+ unsigned long val, void *data)
+{
+ if (val == SYS_RESTART)
+ isRestart = 1;
+ return NOTIFY_OK;
+}
+
static void stex_gettime(__le64 *time)
{