From: David Brownell <david-b@pacbell.net>
To: bill davidsen <davidsen@tmr.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Richard Curnow <Richard.Curnow@superh.com>
Subject: Re: Handling of bounce buffers by rh_call_control
Date: Wed, 17 Dec 2003 18:40:37 -0800 [thread overview]
Message-ID: <3FE113A5.8060900@pacbell.net> (raw)
In-Reply-To: <200312172247.RAA08325@gatekeeper.tmr.com>
> | > - u8 *ubuf = urb->transfer_buffer;
> | > + u8 *ubuf = (u8 *) urb->transfer_dma;
> | > int len = 0;
> | >
> | > ...
> | > memcpy (ubuf, bufp, len);
> |
> | Which is why that particular patch is wrong: "ubuf" is a dma address,
> | not expected to work for memcpy().
>
> But the existing code most certainly does use it with memcpy. I'm
> looking at test11-mm1 source, but the last memcpy line he noted is most
> definitely in the existing source.
As in, "ubuf is NOW a dma address ... it wasn't one before that patch,
it was a regular kernel mappped address. Otherwise memcpy() would
never have worked. Changing it would break more typical kernels, with
no need for bounce buffering.
The right fix is just to bypass the DMA mapping for root hubs,
as in that 2.6 patch from Russell that I mentioned. It's the
unmap that was causing trouble, since it clobbered the data
which memcpy() had just stored into that buffer.
- Dave
next prev parent reply other threads:[~2003-12-18 2:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-17 11:41 Handling of bounce buffers by rh_call_control Richard Curnow
2003-12-17 16:29 ` David Brownell
2003-12-17 22:47 ` bill davidsen
[not found] ` <200312172247.RAA08325@gatekeeper.tmr.com>
2003-12-18 2:40 ` David Brownell [this message]
2003-12-18 14:32 ` Richard Curnow
2003-12-18 14:53 ` iproute2 and 2.6.0 kernel Remus
2003-12-22 19:07 ` bill davidsen
2003-12-30 11:31 ` Remus
2003-12-18 15:36 ` Handling of bounce buffers by rh_call_control David Brownell
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=3FE113A5.8060900@pacbell.net \
--to=david-b@pacbell.net \
--cc=Richard.Curnow@superh.com \
--cc=davidsen@tmr.com \
--cc=linux-kernel@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