mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.41, cciss, tape code cleanup (3 of 5)
@ 2002-10-09 14:35 Stephen Cameron
  0 siblings, 0 replies; only message in thread
From: Stephen Cameron @ 2002-10-09 14:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe


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 */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-09 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09 14:35 [PATCH] 2.5.41, cciss, tape code cleanup (3 of 5) Stephen Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®