patch-2.4.19 linux-2.4.19/drivers/scsi/qlogicfc.c
Next file: linux-2.4.19/drivers/scsi/scsi.c
Previous file: linux-2.4.19/drivers/scsi/qlogicfas.c
Back to the patch index
Back to the overall index
- Lines: 57
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/scsi/qlogicfc.c
- Orig date:
Thu Oct 25 13:53:51 2001
diff -urN linux-2.4.18/drivers/scsi/qlogicfc.c linux-2.4.19/drivers/scsi/qlogicfc.c
@@ -803,7 +803,7 @@
outw(HCCR_CLEAR_RISC_INTR, host->io_port + HOST_HCCR);
isp2x00_enable_irqs(host);
/* wait for the loop to come up */
- for (wait_time = jiffies + 10 * HZ; wait_time > jiffies && hostdata->adapter_state == AS_LOOP_DOWN;) {
+ for (wait_time = jiffies + 10 * HZ; time_before(jiffies, wait_time) && hostdata->adapter_state == AS_LOOP_DOWN;) {
barrier();
cpu_relax();
}
@@ -820,7 +820,7 @@
some time before recognizing it is attached to a fabric */
#if ISP2x00_FABRIC
- for (wait_time = jiffies + 5 * HZ; wait_time > jiffies;) {
+ for (wait_time = jiffies + 5 * HZ; time_before(jiffies, wait_time);) {
barrier();
cpu_relax();
}
@@ -1343,18 +1343,11 @@
num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
num_free = (num_free > 2) ? num_free - 2 : 0;
- host->can_queue = hostdata->queued + num_free;
+ host->can_queue = host->host_busy + num_free;
if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
host->can_queue = QLOGICFC_REQ_QUEUE_LEN;
host->sg_tablesize = QLOGICFC_MAX_SG(num_free);
- /* this is really gross */
- if (host->can_queue <= host->host_busy){
- if (host->can_queue+2 < host->host_busy)
- DEBUG(printk("qlogicfc%d.c crosses its fingers.\n", hostdata->host_id));
- host->can_queue = host->host_busy + 1;
- }
-
LEAVE("isp2x00_queuecommand");
return 0;
@@ -1623,17 +1616,11 @@
num_free = QLOGICFC_REQ_QUEUE_LEN - REQ_QUEUE_DEPTH(in_ptr, out_ptr);
num_free = (num_free > 2) ? num_free - 2 : 0;
- host->can_queue = hostdata->queued + num_free;
+ host->can_queue = host->host_busy + num_free;
if (host->can_queue > QLOGICFC_REQ_QUEUE_LEN)
host->can_queue = QLOGICFC_REQ_QUEUE_LEN;
host->sg_tablesize = QLOGICFC_MAX_SG(num_free);
- if (host->can_queue <= host->host_busy){
- if (host->can_queue+2 < host->host_busy)
- DEBUG(printk("qlogicfc%d : crosses its fingers.\n", hostdata->host_id));
- host->can_queue = host->host_busy + 1;
- }
-
outw(HCCR_CLEAR_RISC_INTR, host->io_port + HOST_HCCR);
LEAVE_INTR("isp2x00_intr_handler");
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)