Re: [PATCH] 2.5.60 make cciss driver compile

From: steve cameron (steve.cameron@hp.com)
Date: Wed Feb 12 2003 - 02:21:02 EST


Remove unneeded cciss_scsi init code from cciss driver.
(patch 8 of 11)
-- steve

--- linux-2.5.60/drivers/block/cciss.c~kill_bogus_scsi_code 2003-02-12 10:13:08.000000000 +0600
+++ linux-2.5.60-scameron/drivers/block/cciss.c 2003-02-12 10:13:08.000000000 +0600
@@ -2440,9 +2440,6 @@ static int __init cciss_init_one(struct
                 set_capacity(disk, drv->nr_blocks);
                 add_disk(disk);
         }
-
- cciss_register_scsi(i, 1); /* hook ourself into SCSI subsystem */
-
         return(1);
 }
 
--- linux-2.5.60/drivers/block/cciss_scsi.c~kill_bogus_scsi_code 2003-02-12 10:13:08.000000000 +0600
+++ linux-2.5.60-scameron/drivers/block/cciss_scsi.c 2003-02-12 10:13:08.000000000 +0600
@@ -89,8 +89,10 @@ static struct cciss_scsi_hba_t ccissscsi
    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] =
@@ -1530,7 +1532,7 @@ cciss_unregister_scsi(int ctlr)
 }
 
 static int
-cciss_register_scsi(int ctlr, int this_is_init_time)
+cciss_register_scsi(int ctlr)
 {
         unsigned long flags;
 
@@ -1540,15 +1542,10 @@ cciss_register_scsi(int ctlr, int this_i
         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 *)
@@ -1582,7 +1579,7 @@ cciss_engage_scsi(int ctlr)
         }
         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;
 }
 
@@ -1608,7 +1605,7 @@ cciss_proc_tape_report(int ctlr, unsigne
 
 #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 : Sat Feb 15 2003 - 22:00:44 EST