[PATCH] 2.5.41, cciss, tape code cleanup (3 of 5)

From: Stephen Cameron (steve.cameron@hp.com)
Date: Wed Oct 09 2002 - 09:35:21 EST


This patch removes a bit of bogus code that doesn't actually do
anything anymore. (Was related to cciss tape drive code which
once upon a time tried to engage the scsi subsystem at init time,
which can't be done as block drivers load before the scsi
subsystem is ready.) -- steve

diff -urN linux-2.5.41-0/drivers/block/cciss.c linux-2.5.41-b/drivers/block/cciss.c
--- linux-2.5.41-0/drivers/block/cciss.c Mon Oct 7 14:35:37 2002
+++ linux-2.5.41-b/drivers/block/cciss.c Mon Oct 7 14:59:31 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.41-0/drivers/block/cciss_scsi.c linux-2.5.41-b/drivers/block/cciss_scsi.c
--- linux-2.5.41-0/drivers/block/cciss_scsi.c Fri Sep 27 16:49:15 2002
+++ linux-2.5.41-b/drivers/block/cciss_scsi.c Mon Oct 7 14:59:11 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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:31 EST