Re: USB transfer_buffer allocations on 64bit systems

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Robert Hancock
Date: Friday, April 9, 2010 - 4:38 pm

On Fri, Apr 9, 2010 at 10:50 AM, Sarah Sharp
<sarah.a.sharp@linux.intel.com> wrote:

I'm not sure why the address would be that huge, unless it's not
actually a physical address, or there's some kind of remapping going
on?


The DMA mask for the controller isn't being set anywhere (in the
version that's in Linus' current git anyway). In that case it'll
default to 32-bit and any DMA mappings above 4GB will need to be
remapped. The controller driver doesn't do the mapping itself but the
USB core does, passing in the controller device as the one doing the
DMA, so if the controller's DMA mask is set to 32-bit then the buffers
passed in will get remapped/bounced accordingly.

You should likely be setting the DMA mask for the controller device to
64-bit if the HCC_64BIT_ADDR flag is set, similar to the code in
ehci-hcd.c which is currently #if 0'ed out.

You can see the currently set mask in sysfs under
/sys/devices/pci(whatever)/dma_mask_bits.


Ah, I see it. That could presumably be tested now (the NEC D720200F1
chip on the Asus U3S6 card I have seems to support MSI-X with 8
vectors).

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: USB transfer_buffer allocations on 64bit systems, Alan Stern, (Wed Apr 7, 12:13 pm)
Re: USB transfer_buffer allocations on 64bit systems, Robert Hancock, (Wed Apr 7, 4:59 pm)
Re: USB transfer_buffer allocations on 64bit systems, Robert Hancock, (Thu Apr 8, 5:01 pm)
Re: USB transfer_buffer allocations on 64bit systems, Sarah Sharp, (Fri Apr 9, 9:50 am)
Re: USB transfer_buffer allocations on 64bit systems, Robert Hancock, (Fri Apr 9, 4:38 pm)