Re: [SCSI] Set max_phys_segments to sg_tablesize
From: Jens Axboe (axboe_at_suse.de)
Date: 10/15/03
- Previous message: Herbert Xu: "[SCSI] Set max_phys_segments to sg_tablesize"
- In reply to: Herbert Xu: "[SCSI] Set max_phys_segments to sg_tablesize"
- Next in thread: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"
- Reply: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Oct 2003 14:02:59 +0200 To: Herbert Xu <herbert@gondor.apana.org.au>
On Wed, Oct 15 2003, Herbert Xu wrote:
> 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.
Is sg_tablesize guarenteed to be set? Looks like you need a
===== drivers/scsi/hosts.c 1.94 vs edited =====
--- 1.94/drivers/scsi/hosts.c Sun Sep 21 19:52:38 2003
+++ edited/drivers/scsi/hosts.c Wed Oct 15 14:02:14 2003
@@ -234,7 +234,11 @@
shost->hostt = sht;
shost->this_id = sht->this_id;
shost->can_queue = sht->can_queue;
+
shost->sg_tablesize = sht->sg_tablesize;
+ if (!shost->sg_tablesize)
+ shost->sg_tablesize = MAX_PHYS_SEGMENTS;
+
shost->cmd_per_lun = sht->cmd_per_lun;
shost->unchecked_isa_dma = sht->unchecked_isa_dma;
shost->use_clustering = sht->use_clustering;
additionally.
-- Jens Axboe - 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/
- Previous message: Herbert Xu: "[SCSI] Set max_phys_segments to sg_tablesize"
- In reply to: Herbert Xu: "[SCSI] Set max_phys_segments to sg_tablesize"
- Next in thread: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"
- Reply: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|