public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	gibbs@scsiguy.com
Subject: Re: [BUG] x86_64 pci_map_sg modifies sg list - fails multiple  map/unmaps
Date: Mon, 5 Jan 2004 13:01:18 -0800	[thread overview]
Message-ID: <20040105130118.0cb404b8.davem@redhat.com> (raw)
In-Reply-To: <p73brpi1544.fsf@verdi.suse.de>

On 05 Jan 2004 22:02:19 +0100
Andi Kleen <ak@suse.de> wrote:

> It sets length to zero to terminate the list when entries were merged.
> It doesn't have a dma_length.

I understand, and you are defining dma_length to just use the
normal sg->length field, and I'm trying to explain to you that this
is not allowed.  If you want to modify the length field to zero terminate
the DMA chunks, you must have a seperate dma_length field in your
platforms scatterlist structure.

Again, for the 3rd time, see what sparc64 is doing here.

> It tripping over remapped lists is an side effect, but an useful one 
> because remapping is not supported (merging destroys information that
> cannot be reconstructed). If the bug didn't exist you would get data
> corruption.

You should not be modifying any portion of the non-DMA fields.
Therefore, if the SG is unmapped, then passed into your IOMMU code for
a future map call, it should just work.


  reply	other threads:[~2004-01-05 21:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200401051929.i05JTsM0000014248@mudpuddle.cs.wustl.edu.suse.lists.linux.kernel>
     [not found] ` <20040105112800.7a9f240b.davem@redhat.com.suse.lists.linux.kernel>
2004-01-05 21:02   ` [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps Andi Kleen
2004-01-05 21:01     ` David S. Miller [this message]
2004-01-05 21:31       ` Andi Kleen
2004-01-05 21:40         ` [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps II Andi Kleen
2004-01-06  0:05         ` [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps James Bottomley
2004-01-06  3:06           ` Andi Kleen
2004-01-06  3:04             ` David S. Miller
2004-01-06  3:14               ` James Bottomley
2004-01-07 16:33 Berkley Shands
  -- strict thread matches above, loose matches on Subject: below --
2004-01-07 15:35 Berkley Shands
2004-01-07 19:19 ` badari
     [not found] <2938942704.1073325455@aslan.btc.adaptec.com.suse.lists.linux.kernel>
     [not found] ` <m3brpi41q0.fsf@averell.firstfloor.org.suse.lists.linux.kernel>
     [not found]   ` <2997092704.1073333041@aslan.btc.adaptec.com.suse.lists.linux.kernel>
2004-01-05 20:58     ` Andi Kleen
2004-01-05 20:00 Berkley Shands
2004-01-05 19:29 Berkley Shands
2004-01-05 19:28 ` David S. Miller
2004-01-05 17:57 Justin T. Gibbs
2004-01-05 19:22 ` David S. Miller
2004-01-05 19:41 ` Badari Pulavarty
2004-01-05 19:47 ` Andi Kleen
2004-01-05 20:04   ` Justin T. Gibbs
2004-01-05 20:35   ` David S. Miller
2004-01-05 21:10     ` Andi Kleen

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=20040105130118.0cb404b8.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=ak@suse.de \
    --cc=gibbs@scsiguy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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