lkml.org 
[lkml]   [2001]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Fix scsi_unblock_requests()
Date
From
In its current implementation, scsi_unblock_requests() simply
clears host_self_blocked in the SCSI host struct. This means
that either a transaction must complete or a new transaction
be issued before the mid-layer will recognize that it can
run the queues. There is no guarantee that either of these
events will ever happen.

This patch attempts to run the queues manually when the host
unblocks. scsi_queue_next_request() verifies all other state
to ensure queuing new transactions is safe prior to proceeding.

This patch is part of versions 6.1.10 and 6.1.11 of the
aic7xxx driver. Its used, along with scsi_block_requests(), to
hold off the mid-layer during the initial bus settle delay without
resorting to a busy loop.

--
Justin

diff -u -r -N linux-2.4.3.virgin/drivers/scsi/scsi_lib.c linux-2.4.3/drivers/scsi/scsi_lib.c
--- linux-2.4.3.virgin/drivers/scsi/scsi_lib.c Fri Mar 2 19:38:39 2001
+++ linux-2.4.3/drivers/scsi/scsi_lib.c Thu Apr 5 14:28:17 2001
@@ -1108,9 +1108,13 @@
*/
void scsi_unblock_requests(struct Scsi_Host * SHpnt)
{
+ Scsi_Device *SDloop;
+
SHpnt->host_self_blocked = FALSE;
+ /* Now that we are unblocked, try to start the queues. */
+ for (SDloop = SHpnt->host_queue; SDloop; SDloop = SDloop->next)
+ scsi_queue_next_request(&SDloop->request_queue, NULL);
}
-

/*
* Function: scsi_report_bus_reset()
-
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/
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.037 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site