[7722] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: SCSI queueing status.

daemon@ATHENA.MIT.EDU (Juergen Fischer)
Sat Dec 18 11:11:58 1999

From: Juergen_Fischer@t-online.de (Juergen Fischer)
Message-Id: <199912181601.RAA31979@obiwan.jef.norbit.de>
In-Reply-To: <Pine.LNX.4.10.9912171849590.30229-100000@gwyn.tux.org> from Eric
 Youngdale at "Dec 18, 1999 00:05:39 am"
To: Eric Youngdale <eric@andante.org>
Date:   Sat, 18 Dec 1999 17:01:15 +0100 (MET)
Cc: Linux SCSI Mailing List <linux-scsi@vger.rutgers.edu>
Reply-To: fischer@norbit.de
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=ELM945532875-22076-0_
Content-Transfer-Encoding: 8bit


--ELM945532875-22076-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

> 	3) There was a report on linux-kernel about a scatter-gather table
> segment counting problem, which led to a panic.  I ask for, but have yet
> to receive details on this one.  As far as I know, there is only one
> person who has reported this issue.

It seems to apply to scsi drivers that use SG_ALL (ie. don't use the
merge functions from scsi_merge) without clustering (like the aha152x
driver).

If the merge functions are not used, ll_rw_blk will count the number
of non-continuous segments (without actually merging them).  __init_io
also doesn't merge them, but counts all segments.

The attached patch fixes that problem by recounting the segments in
that case.

A cleaner way might be to change the default behaviour in ll_rw_blk (e.g.
by default merge functions).   As far as I can see the only other thing
beside scsi_merge that references nr_segments is the DAC960 driver.


Jürgen

--ELM945532875-22076-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: attachment; filename=scsi_merge.diff
Content-Description: /usr/local/src/kernel/scsi_merge.diff
Content-Transfer-Encoding: 7bit

--- orig/linux/drivers/scsi/scsi_merge.c	Wed Dec 15 22:38:13 1999
+++ linux/drivers/scsi/scsi_merge.c	Sat Dec 18 16:57:51 1999
@@ -552,7 +552,8 @@
 	/*
 	 * First we need to know how many scatter gather segments are needed.
 	 */
-	if (!sg_count_valid) {
+	if((SCpnt->host->sg_tablesize == SG_ALL && !use_clustering) ||
+	    !sg_count_valid) {
 		count = __count_segments(req, use_clustering, dma_host);
 	} else {
 		count = req->nr_segments;

--ELM945532875-22076-0_--

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post