* DRIVER_VER
*/
#define IPS_VERSION_HIGH "5.99"
-#define IPS_VERSION_LOW ".00-BETA"
+#define IPS_VERSION_LOW ".01-BETA"
#if !defined(__i386__) && !defined(__ia64__)
static unsigned int ips_next_controller = 0;
static unsigned int ips_num_controllers = 0;
static unsigned int ips_released_controllers = 0;
+static int ips_hotplug;
static int ips_cmd_timeout = 60;
static int ips_reset_timeout = 60 * 5;
static int ips_force_memio = 1; /* Always use Memory Mapped I/O */
ips_free(ips_ha[i]);
ips_released_controllers++;
}
-
+ ips_hotplug = 1;
return (ips_num_controllers);
}
/* free IRQ */
free_irq(ha->irq, ha);
+ IPS_REMOVE_HOST(sh);
scsi_unregister(sh);
ips_released_controllers++;
sh->max_channel = ha->nbus - 1;
sh->can_queue = ha->max_cmds-1;
+ IPS_ADD_HOST(sh, NULL);
return 0;
}
return -ENODEV;
ips_driver_template.module = THIS_MODULE;
ips_order_controllers();
- if( scsi_register_host(&ips_driver_template) ){
+ if( IPS_REGISTER_HOSTS(&ips_driver_template) ){
pci_unregister_driver(&ips_pci_driver);
return -ENODEV;
}
/****************************************************************************/
static void __exit
ips_module_exit(void){
- scsi_unregister_host(&ips_driver_template);
+ IPS_UNREGISTER_HOSTS(&ips_driver_template);
pci_unregister_driver(&ips_pci_driver);
unregister_reboot_notifier(&ips_notifier);
}
if (rc == SUCCESS)
rc = ips_init_phase2(index);
+ if(ips_hotplug)
+ if(ips_register_scsi(index)){
+ ips_free(ips_ha[index]);
+ rc = -1;
+ }
+
if (rc == SUCCESS)
ips_num_controllers++;
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- #define scsi_register_host(x) scsi_register_module(MODULE_SCSI_HA,x)
- #define scsi_unregister_host(x) scsi_unregister_module(MODULE_SCSI_HA,x)
+ #define IPS_REGISTER_HOSTS(SHT) scsi_register_module(MODULE_SCSI_HA,SHT)
+ #define IPS_UNREGISTER_HOSTS(SHT) scsi_unregister_module(MODULE_SCSI_HA,SHT)
+ #define IPS_ADD_HOST(shost,device)
+ #define IPS_REMOVE_HOST(shost)
+ #else
+ #define IPS_REGISTER_HOSTS(SHT) (!ips_detect(SHT))
+ #define IPS_UNREGISTER_HOSTS(SHT)
+ #define IPS_ADD_HOST(shost,device) scsi_add_host(shost,device)
+ #define IPS_REMOVE_HOST(shost) scsi_remove_host(shost)
#endif
#ifndef MDELAY