linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Linus Torvalds <torvalds@osdl.org>,
	Christoph Hellwig <hch@infradead.org>,
	axboe@suse.de,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [SCSI] Set max_phys_segments to sg_tablesize
Date: Wed, 15 Oct 2003 21:57:40 +1000	[thread overview]
Message-ID: <20031015115740.GA23469@gondor.apana.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Hi:

Many SCSI host drivers assume that use_sg will be <= sg_tablesize.
Hence they may break under 2.6 as the number of physical segments
is not limited by sg_tablesize.  This patch fixes that.

Cheers,
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 813 bytes --]

Index: kernel-source-2.5/drivers/scsi/scsi_lib.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/scsi/scsi_lib.c,v
retrieving revision 1.1.1.16
diff -u -r1.1.1.16 scsi_lib.c
--- kernel-source-2.5/drivers/scsi/scsi_lib.c	28 Sep 2003 04:44:15 -0000	1.1.1.16
+++ kernel-source-2.5/drivers/scsi/scsi_lib.c	15 Oct 2003 11:32:20 -0000
@@ -1243,7 +1243,7 @@
 	blk_queue_prep_rq(q, scsi_prep_fn);
 
 	blk_queue_max_hw_segments(q, shost->sg_tablesize);
-	blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
+	blk_queue_max_phys_segments(q, shost->sg_tablesize);
 	blk_queue_max_sectors(q, shost->max_sectors);
 	blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));
 	blk_queue_segment_boundary(q, shost->dma_boundary);

             reply	other threads:[~2003-10-15 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15 11:57 Herbert Xu [this message]
2003-10-15 12:02 ` [SCSI] Set max_phys_segments to sg_tablesize Jens Axboe
2003-10-15 12:06   ` Herbert Xu
2003-10-15 12:14 mika.penttila
2003-10-15 12:31 ` Herbert Xu
2003-10-15 12:37 mika.penttila
2003-10-16  4:51 ` David S. Miller
2003-10-16  6:57   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031015115740.GA23469@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=axboe@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).