[PATCH 4/8] 2.5.43 cciss kill bogus cciss_scsi init code

Stephen Cameron (steve.cameron@hp.com)
Wed, 16 Oct 2002 15:36:45 -0600


Remove unneeded cciss_scsi init code

diff -urN linux-2.5.43-c/drivers/block/cciss.c linux-2.5.43-d/drivers/block/cciss.c
--- linux-2.5.43-c/drivers/block/cciss.c Wed Oct 16 08:18:43 2002
+++ linux-2.5.43-d/drivers/block/cciss.c Wed Oct 16 08:22:21 2002
@@ -2454,9 +2454,6 @@
set_capacity(disk, drv->nr_blocks);
add_disk(disk);
}
-
- cciss_register_scsi(i, 1); /* hook ourself into SCSI subsystem */
-
return(1);
}

diff -urN linux-2.5.43-c/drivers/block/cciss_scsi.c linux-2.5.43-d/drivers/block/cciss_scsi.c
--- linux-2.5.43-c/drivers/block/cciss_scsi.c Wed Oct 16 08:17:57 2002
+++ linux-2.5.43-d/drivers/block/cciss_scsi.c Wed Oct 16 08:21:44 2002
@@ -89,8 +89,10 @@
working even with the SCSI system. It's so
scsi_unregister_host will differentiate the controllers.
When register_scsi_module is called, each host template is
- customized (name change) in cciss_register_scsi()
- (that's called from cciss.c:cciss_init_one()) */
+ customized (name change) in cciss_register_scsi() (that's
+ called from cciss_engage_scsi, called from
+ cciss.c:cciss_proc_write(), on "engage scsi" being received
+ from user space.) */

static
Scsi_Host_Template driver_template[MAX_CTLR] =
@@ -1549,7 +1551,7 @@
}

static int
-cciss_register_scsi(int ctlr, int this_is_init_time)
+cciss_register_scsi(int ctlr)
{
unsigned long flags;

@@ -1559,15 +1561,10 @@
driver_template[ctlr].module = THIS_MODULE;;

/* Since this is really a block driver, the SCSI core may not be
- initialized yet, in which case, calling scsi_register_host
- would hang. instead, we will do it later, via /proc filesystem
+ initialized at init time, in which case, calling scsi_register_host
+ would hang. Instead, we do it later, via /proc filesystem
and rc scripts, when we know SCSI core is good to go. */

- if (this_is_init_time) {
- CPQ_TAPE_UNLOCK(ctlr, flags);
- return 0;
- }
-
/* Only register if SCSI devices are detected. */
if (ccissscsi[ctlr].ndevices != 0) {
((struct cciss_scsi_adapter_data_t *)
@@ -1601,7 +1598,7 @@
}
spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags);
cciss_update_non_disk_devices(ctlr, -1);
- cciss_register_scsi(ctlr, 0);
+ cciss_register_scsi(ctlr);
return 0;
}

@@ -1627,7 +1624,7 @@

#define cciss_find_non_disk_devices(cntl_num)
#define cciss_unregister_scsi(ctlr)
-#define cciss_register_scsi(ctlr, this_is_init_time)
+#define cciss_register_scsi(ctlr)
#define cciss_proc_tape_report(ctlr, buffer, pos, len)

#endif /* CONFIG_CISS_SCSI_TAPE */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/