Messages in this thread Patch in this message | | | Date | Wed, 23 Oct 2002 09:30:24 -0600 | From | Stephen Cameron <> | Subject | [PATCH 5/10] 2.5.44 cciss kill bogus scsi code |
| |
patch 5 of 10 The whole set can be grabbed via anonymous cvs (empty password): cvs -d:pserver:anonymous@cvs.cciss.sourceforge.net:/cvsroot/cciss login cvs -z3 -d:pserver:anonymous@cvs.cciss.sourceforge.net:/cvsroot/cciss co 2.5.44
DESC Remove unneeded cciss_scsi init code
drivers/block/cciss.c | 3 --- drivers/block/cciss_scsi.c | 21 +++++++++------------ 2 files changed, 9 insertions, 15 deletions
--- linux-2.5.44/drivers/block/cciss.c~kill_bogus_scsi_code Mon Oct 21 12:05:54 2002 +++ linux-2.5.44-root/drivers/block/cciss.c Mon Oct 21 12:05:54 2002 @@ -2446,9 +2446,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.44/drivers/block/cciss_scsi.c~kill_bogus_scsi_code Mon Oct 21 12:05:54 2002 +++ linux-2.5.44-root/drivers/block/cciss_scsi.c Mon Oct 21 12:05:54 2002 @@ -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] = @@ -1531,7 +1533,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; @@ -1541,15 +1543,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 *) @@ -1583,7 +1580,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; } @@ -1609,7 +1606,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/
| |