Re: [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps

From: David S. Miller (davem_at_redhat.com)
Date: 01/05/04

  • Next message: Linus Torvalds: "Re: [patch/revised] wake_up_info() ..."
    Date:	Mon, 5 Jan 2004 12:35:09 -0800
    To: Andi Kleen <ak@muc.de>
    
    

    On Mon, 05 Jan 2004 20:47:19 +0100
    Andi Kleen <ak@muc.de> wrote:

    > Actually I disabled merging by default in the latest x86-64 code,
    > but it can be still enabled by the user using options (it makes some
    > adapters run several percent faster). I would appreciate if you could
    > fix the problem anyways.
    >
    > I was actually planning to add a BUG() for this. Should do that.
    > There is already one that triggers often when the problem occurs.

    Andi, you must not modify sg->length in any way shape or form.

    The following is legal:

            pci_map_sg(..&sg);
            pci_unmap_sg(...&sg);
            pci_map_sg(..&sg);

    If you must modify the length field for DMA, you must have a seperate
    dma_length member of the scatterlist structure on your platform, see what
    sparc64 does here.

    If the documentation states this wrongly, it's a doc bug.
    -
    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: Linus Torvalds: "Re: [patch/revised] wake_up_info() ..."

    Relevant Pages