lkml.org 
[lkml]   [2003]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Handling of bounce buffers by rh_call_control

> | > - 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




-
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/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.088 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site