From: davidsen@tmr.com (bill davidsen)
To: linux-kernel@vger.kernel.org
Subject: Re: Handling of bounce buffers by rh_call_control
Date: 17 Dec 2003 22:47:14 GMT [thread overview]
Message-ID: <brqmdi$83t$1@gatekeeper.tmr.com> (raw)
In-Reply-To: 3FE08470.5040801@pacbell.net
In article <3FE08470.5040801@pacbell.net>,
David Brownell <david-b@pacbell.net> wrote:
| Hi,
|
| Richard Curnow wrote:
| > The following patch
| >
| > ===== drivers/usb/hcd.c 1.10 vs edited =====
| > --- 1.10/drivers/usb/hcd.c Mon Mar 31 14:22:42 2003
| > +++ edited/drivers/usb/hcd.c Wed Dec 17 11:26:53 2003
| > @@ -323,7 +323,7 @@
| > struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet;
| > u16 typeReq, wValue, wIndex, wLength;
| > const u8 *bufp = 0;
| > - u8 *ubuf = urb->transfer_buffer;
| > + u8 *ubuf = (u8 *) urb->transfer_dma;
| > int len = 0;
| >
| > typeReq = (cmd->bRequestType << 8) | cmd->bRequest;
| >
| > seems to be needed to make the following code later in the function work
| >
| > if (bufp) {
| > if (urb->transfer_buffer_length < len)
| > len = urb->transfer_buffer_length;
| > urb->actual_length = len;
| > // always USB_DIR_IN, toward host
| > 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.
Or did I misunderstand what you meant by "not expected to work for
memcpy()?" It may be that the code around the memcpy is wrong and should
be using ubuf, and that no diddling with fix it, but someone clearly DID
expect it to work ;-)
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
next prev parent reply other threads:[~2003-12-17 22:58 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 [this message]
[not found] ` <200312172247.RAA08325@gatekeeper.tmr.com>
2003-12-18 2:40 ` David Brownell
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='brqmdi$83t$1@gatekeeper.tmr.com' \
--to=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