Re: [SCSI] Set max_phys_segments to sg_tablesize

From: Jens Axboe (axboe_at_suse.de)
Date: 10/15/03

  • Next message: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"
    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/
    

  • Next message: Herbert Xu: "Re: [SCSI] Set max_phys_segments to sg_tablesize"

    Relevant Pages

    • Re: [BK PATCH] Fix ip_conntrack_amanda data corruption bug that breaks amanda dumps
      ... Herbert Xu wrote: ... >> The data that is changed is only a copy, the actual packet is not touched. ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: assertion (cnt <= tp->packets_out) failed
      ... > It therefore may be desirable to keep Herbert's fix in there, ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: [OT] the the in mails ...
      ... On Maw, 2003-08-19 at 02:24, Herbert Pƶtzl wrote: ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: Suspend 2 merge: 9/51: init/* changes.
      ... Herbert Xu wrote: ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: netlink nlmsg_pid supposed to be pid or tid?
      ... Herbert Xu wrote: ... we were actually already calling getsockname() a bit ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)