aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/gdth.c')
-rw-r--r--drivers/scsi/gdth.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 62e3cda859af..7f7013e80a88 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -671,7 +671,7 @@ static struct file_operations gdth_fops = {
671static struct notifier_block gdth_notifier = { 671static struct notifier_block gdth_notifier = {
672 gdth_halt, NULL, 0 672 gdth_halt, NULL, 0
673}; 673};
674 674static int notifier_disabled = 0;
675 675
676static void gdth_delay(int milliseconds) 676static void gdth_delay(int milliseconds)
677{ 677{
@@ -4595,13 +4595,13 @@ static int __init gdth_detect(struct scsi_host_template *shtp)
4595 add_timer(&gdth_timer); 4595 add_timer(&gdth_timer);
4596#endif 4596#endif
4597 major = register_chrdev(0,"gdth",&gdth_fops); 4597 major = register_chrdev(0,"gdth",&gdth_fops);
4598 notifier_disabled = 0;
4598 register_reboot_notifier(&gdth_notifier); 4599 register_reboot_notifier(&gdth_notifier);
4599 } 4600 }
4600 gdth_polling = FALSE; 4601 gdth_polling = FALSE;
4601 return gdth_ctr_vcount; 4602 return gdth_ctr_vcount;
4602} 4603}
4603 4604
4604
4605static int gdth_release(struct Scsi_Host *shp) 4605static int gdth_release(struct Scsi_Host *shp)
4606{ 4606{
4607 int hanum; 4607 int hanum;
@@ -5632,10 +5632,14 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf)
5632 char cmnd[MAX_COMMAND_SIZE]; 5632 char cmnd[MAX_COMMAND_SIZE];
5633#endif 5633#endif
5634 5634
5635 if (notifier_disabled)
5636 return NOTIFY_OK;
5637
5635 TRACE2(("gdth_halt() event %d\n",(int)event)); 5638 TRACE2(("gdth_halt() event %d\n",(int)event));
5636 if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF) 5639 if (event != SYS_RESTART && event != SYS_HALT && event != SYS_POWER_OFF)
5637 return NOTIFY_DONE; 5640 return NOTIFY_DONE;
5638 5641
5642 notifier_disabled = 1;
5639 printk("GDT-HA: Flushing all host drives .. "); 5643 printk("GDT-HA: Flushing all host drives .. ");
5640 for (hanum = 0; hanum < gdth_ctr_count; ++hanum) { 5644 for (hanum = 0; hanum < gdth_ctr_count; ++hanum) {
5641 gdth_flush(hanum); 5645 gdth_flush(hanum);
@@ -5679,7 +5683,6 @@ static int gdth_halt(struct notifier_block *nb, ulong event, void *buf)
5679#ifdef GDTH_STATISTICS 5683#ifdef GDTH_STATISTICS
5680 del_timer(&gdth_timer); 5684 del_timer(&gdth_timer);
5681#endif 5685#endif
5682 unregister_reboot_notifier(&gdth_notifier);
5683 return NOTIFY_OK; 5686 return NOTIFY_OK;
5684} 5687}
5685 5688