Subject: Re: allocmem in interrupt context
To: Iain Hibbert <email@example.com>
From: Matthew Orgass <firstname.lastname@example.org>
Date: 10/29/2005 15:59:10
On 2005-10-28 email@example.com wrote:
> and none of those approaches splvm() so memory allocations should be ok, hm?
No, memory allocation might sleep, so it needs a process context.
> It may be (certainly is, in fact) that I am unclear on the way the USB
> code works, documentation is minimal it seems.. not sure why the memory
> is being allocated in there in any case, as I am providing a buffer though
> it is not an usbd_alloc_buffer() buffer, was getting the transfer into an
> MBUF (cluster) data area so I can just pass it off directly.
The buffer needs to be used for DMA, so it needs to come from bus_dma
allocation. Unless you have a usbd_alloc_buffer buffer it will allocate a