patch-2.4.10 linux/drivers/scsi/megaraid.c
Next file: linux/drivers/scsi/mesh.c
Previous file: linux/drivers/scsi/lasi700.h
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Mon Sep 17 13:16:30 2001
- Orig file:
v2.4.9/linux/drivers/scsi/megaraid.c
- Orig date:
Mon Aug 27 12:41:44 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/scsi/megaraid.c linux/drivers/scsi/megaraid.c
@@ -2857,6 +2857,7 @@
if (!host)
goto err_unmap;
+#if 0
/*
* Comment the following initialization if you know 'max_sectors' is
* not defined for this kernel.
@@ -2864,6 +2865,7 @@
* greatly increases the IO performance - AM
*/
host->max_sectors = 1024;
+#endif
scsi_set_pci_device(host, pdev);
megaCfg = (mega_host_config *) host->hostdata;
@@ -3138,16 +3140,18 @@
* First argument (major) to register_chrdev implies a dynamic major
* number allocation.
*/
- major = register_chrdev (0, "megadev", &megadev_fops);
+ if (count) {
+ major = register_chrdev (0, "megadev", &megadev_fops);
- /*
- * Register the Shutdown Notification hook in kernel
- */
- if (register_reboot_notifier (&mega_notifier)) {
- printk ("MegaRAID Shutdown routine not registered!!\n");
- }
+ /*
+ * Register the Shutdown Notification hook in kernel
+ */
+ if (register_reboot_notifier (&mega_notifier)) {
+ printk ("MegaRAID Shutdown routine not registered!!\n");
+ }
- init_MUTEX (&mimd_entry_mtx);
+ init_MUTEX (&mimd_entry_mtx);
+ }
return count;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)