lkml.org 
[lkml]   [2003]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [SCSI] Set max_phys_segments to sg_tablesize
Date
> 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.
>

Physical segments don't matter, hw segments does and it's bounded by sg_tablesize.

--Mika

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);
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.032 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site