patch-2.0.24 linux/drivers/scsi/scsi.c
Next file: linux/drivers/scsi/sd.c
Previous file: linux/drivers/scsi/hosts.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
Wed Oct 30 03:12:04 1996
- Orig file:
v2.0.23/linux/drivers/scsi/scsi.c
- Orig date:
Tue Oct 8 21:20:14 1996
diff -u --recursive --new-file v2.0.23/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
@@ -17,8 +17,8 @@
* add scatter-gather, multiple outstanding request, and other
* enhancements.
*
- * Native multichannel and wide scsi support added
- * by Michael Neuffer neuffer@goofy.zdv.uni-mainz.de
+ * Native multichannel, wide scsi, /proc/scsi and hot plugging
+ * support added by Michael Neuffer <mike@i-connect.net>
*
* Added request_module("scsi_hostadapter") for kerneld:
* (Put an "alias scsi_hostadapter your_hostadapter" in /etc/conf.modules)
@@ -47,6 +47,7 @@
#include <linux/stat.h>
#include <linux/blk.h>
#include <linux/interrupt.h>
+#include <linux/delay.h>
#include <asm/system.h>
#include <asm/irq.h>
@@ -275,6 +276,7 @@
*/
{"SONY","CD-ROM CDU-8001","*", BLIST_BORKEN},
{"TEXEL","CD-ROM","1.06", BLIST_BORKEN},
+{"IOMEGA","Io20S *F","*", BLIST_KEY},
{"INSITE","Floptical F*8I","*", BLIST_KEY},
{"INSITE","I325VM","*", BLIST_KEY},
{"NRC","MBR-7","*", BLIST_FORCELUN | BLIST_SINGLELUN},
@@ -1215,17 +1217,19 @@
*/
timeout = host->last_reset + MIN_RESET_DELAY;
if (jiffies < timeout) {
- /*
- * NOTE: This may be executed from within an interrupt
- * handler! This is bad, but for now, it'll do. The irq
- * level of the interrupt handler has been masked out by the
- * platform dependent interrupt handling code already, so the
- * sti() here will not cause another call to the SCSI host's
- * interrupt handler (assuming there is one irq-level per
- * host).
- */
- sti();
- while (jiffies < timeout) barrier();
+ int ticks_remaining = timeout - jiffies;
+ /*
+ * NOTE: This may be executed from within an interrupt
+ * handler! This is bad, but for now, it'll do. The irq
+ * level of the interrupt handler has been masked out by the
+ * platform dependent interrupt handling code already, so the
+ * sti() here will not cause another call to the SCSI host's
+ * interrupt handler (assuming there is one irq-level per
+ * host).
+ */
+ sti();
+ while (--ticks_remaining >= 0) udelay(1000000/HZ);
+ host->last_reset = jiffies - MIN_RESET_DELAY;
}
restore_flags(flags);
@@ -1791,7 +1795,8 @@
if ((++SCpnt->retries) < SCpnt->allowed)
{
if ((SCpnt->retries >= (SCpnt->allowed >> 1))
- && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
+ && !(SCpnt->host->last_reset > 0 &&
+ jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
&& !(SCpnt->flags & WAS_RESET))
{
printk("scsi%d channel %d : resetting for second half of retries.\n",
@@ -3062,7 +3067,11 @@
*/
for(shpnt=scsi_hostlist; shpnt; shpnt = shpnt->next)
- if(shpnt->hostt == tpnt) scan_scsis(shpnt,0,0,0,0);
+ if(shpnt->hostt == tpnt) {
+ scan_scsis(shpnt,0,0,0,0);
+ if (shpnt->select_queue_depths != NULL)
+ (shpnt->select_queue_depths)(shpnt, scsi_devices);
+ }
for(sdtpnt = scsi_devicelist; sdtpnt; sdtpnt = sdtpnt->next)
if(sdtpnt->init && sdtpnt->dev_noticed) (*sdtpnt->init)();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov