Re: Device restrictions for OHCIs with HCD_LOCAL_MEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Mar 2011, Michael Hunold wrote:

> Hello,
> 
> I have been working recently on a ARM926-based SoC, which has an
> OHCI-USB with only a small-amount of SRAM. At the moment, only 8kB of
> SRAM are available to the OHCI-USB.
> 
> I have found the comments before hcd_alloc_coherent(), used the
> HCD_LOCAL_MEM flag accordingly and hacked dma_alloc_coherent() so that
> it provides the right memory.
> 
> Basically this is working fine and simple devices like keyboard and
> mouse work without problems.
> 
> Now I tried a couple of WiFi USB adapters and ran into a problem.
> 
> Most of the drivers try to allocate huge amounts of buffers for transmit
> queues in their init function and call usb_submit_urb() for them.
> Ultimately, this triggers a memory allocation from the SRAM, which is of
> course quickly exhausted already at driver init time.
> 
> If I understand it correctly, the "problem" is in the way the devices
> were designed: they don't have local memory from where data is read, but
> they somehow use pre-allocated buffers in main memory (in my case the
> SRAM memory).
> 
> If this is so, then these devices will never work with OHCI-USBs that
> only have a small amount of SRAM attached.
> 
> Is that correct?

More or less, yes.  The devices won't work unless their drivers are 
re-written to allocate less memory for buffers.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux