lkml.org 
[lkml]   [2002]   [Jan]   [1]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateTue, 01 Jan 2002 11:53:31 -0800
FromDavid Brownell <>
SubjectRe: [linux-usb-devel] Re: "sr: unaligned transfer" in 2.5.2-pre1
> (2) How do I pass a highmem address to the HCDs?  The URB structures we use
> don't seem particularly well-suited for this.

The urb->transfer_buffer is required to be normal DMA-able memory,
following the rules in Documentation/DMA-mapping.txt ... that got cleared
up somewhere around the 2.4.5 timeframe, all the HCDs now use the
pci_map_single() calls with those buffers.  kmalloc() is fine, not vmalloc(),
and so on.

Not that I've seen a writeup about highmem (linux/Documentation doesn't
seem to have one anyway) but if I infer correctly from that DMA-mapping.txt
writeup, URBs don't support it because there's no way to specify buffers as
a "struct page *" or an array of "struct scatterlist".  That's the only way that
document identifies to access "highmem memory".


> (1) Do the USB HCDs support highmem?  I seem to recall they do, but I'm not
> certain.

If URBs can't describe highmem, the HCD's won't support them per se;
you'd have to turn highmem to "lowmem" or whatever it's called, and
then let the HCDs manage the lowmem-to-dma_addr_t mappings.

Alternatively, in 2.5 we might add "highmem" support to USB.  Now that
I've looked at it a few minutes, I suspect we must -- just to support block
devices (usb-storage) fully.  Is there more to it than adding page+offset
as an alternative way to describe the transfer_buffer?  (And making all
the "single" mapping calls in the HCDs use page mappings.)

- 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 11:15    [W:0.418 / U:0.310 seconds]
©2003-2008 Jasper Spaans