From: "David S. Miller" <davem@redhat.com>
To: davidm@hpl.hp.com, davidm@napali.hpl.hp.com
Cc: manfred@colorfullife.com, axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: problem with blk_queue_bounce_limit()
Date: Fri, 06 Jun 2003 23:44:01 -0700 (PDT) [thread overview]
Message-ID: <20030606.234401.104035537.davem@redhat.com> (raw)
In-Reply-To: <200306062013.h56KDcLe026713@napali.hpl.hp.com>
From: David Mosberger <davidm@napali.hpl.hp.com>
Date: Fri, 6 Jun 2003 13:13:38 -0700
Yes, but the comment certainly is confusing. How about something like
this:
No arguments.
David> The whole block layer makes all kinds of assumptions about
David> what physically contiguous addresses mean about how they'll
David> be contiguous in the bus addresses the device will actually
David> use to perform the DMA transfer.
This sounds all very dramatic, but try as I might, all I find is three
places where PCI_DMA_BUS_IS_PHYS is used:
- ide-lib.c: used to disable bounce buffering
- scsi_lib.c: used to disable bounce buffering
Fix your grep,
- tg3.c: what the heck??
In order to workaround a "just below 4GB dma address" bug in the
chip, we have to have a reliable way to "remap" the given networking
buffer to some other DMA address that does not meet the hw bug case.
If we don't have an IOMMU, we have to change the buffer itself and
we accomplish this with SKB copy.
But on an IOMMU system, we could end up mapping to the same bogus
DMA address. So we have to solve this problem by keeping the
existng bad mapping, doing a new DMA mapping, then trowing away
the old one.
Did I get this right (or at least close enough)?
Precisely.
Otherwise, you could just always use the copy-the-entire-buffer
workaround.
The new PCI dma mapping I make could map to the SAME bad DMA
address, that's the problem. I could loop forever making new
DMA mappings on an IOMMU system, each and every one falls into
the hw bug case.
I really dislike PCI_DMA_BUS_IS_PHYS, because it introduces a
discontinuity. I don't think it should be necessary.
I totally disagree.
David> We could convert the few compile time checks of
David> PCI_DMA_BUS_IS_PHYS so that you can set this based upon the
David> configuration of the machine if for some configurations it is
David> true. drivers/net/tg3.c is the only offender, my bad :-)
Yes. Would you mind fixing that?
Sure, no problem.
next prev parent reply other threads:[~2003-06-07 6:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-05 6:42 problem with blk_queue_bounce_limit() David Mosberger
2003-06-05 7:20 ` David S. Miller
2003-06-06 6:42 ` David Mosberger
2003-06-06 6:45 ` David S. Miller
2003-06-06 6:54 ` David Mosberger
2003-06-06 7:08 ` David S. Miller
2003-06-06 6:52 ` David S. Miller
2003-06-06 7:19 ` David Mosberger
2003-06-06 7:32 ` David S. Miller
2003-06-06 7:44 ` Christoph Hellwig
2003-06-06 7:43 ` David S. Miller
2003-06-06 7:51 ` Christoph Hellwig
2003-06-06 20:13 ` David Mosberger
2003-06-07 6:44 ` David S. Miller [this message]
2003-06-07 7:05 ` David Mosberger
2003-06-07 7:11 ` David S. Miller
2003-06-10 20:01 ` David Mosberger
2003-06-12 6:47 ` David S. Miller
2003-06-15 7:06 ` Anton Blanchard
2003-06-15 7:11 ` David S. Miller
2003-06-15 8:04 ` Anton Blanchard
2003-06-15 8:18 ` David S. Miller
2003-06-07 7:20 ` David Mosberger
2003-06-07 7:19 ` David S. Miller
2003-06-07 9:44 ` Russell King
2003-06-07 9:47 ` David S. Miller
2003-06-07 13:23 ` Christoph Hellwig
2003-06-10 20:24 ` David Mosberger
-- strict thread matches above, loose matches on Subject: below --
2003-06-06 18:06 James Bottomley
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=20030606.234401.104035537.davem@redhat.com \
--to=davem@redhat.com \
--cc=axboe@suse.de \
--cc=davidm@hpl.hp.com \
--cc=davidm@napali.hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/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