Subject: Re: allocmem in interrupt context
To: Iain Hibbert <plunky@rya-online.net>
From: Matthew Orgass <darkstar@city-net.com>
List: tech-kern
Date: 10/28/2005 15:20:57
On 2005-10-28 plunky@rya-online.net wrote:

> In this case, it finds that commands have completed on the controller so
> updates the command count and notices that there are commands queued and
> the driver is not active, so it restarts the driver - the above message
> is being triggered inside usbd_transfer someplace, which is now being
> called on interrupt context like it says..
>
> Does this message then, imply that I am not doing the right thing? Should
> I be disassociating this event processing further than a soft interrupt?

  I guess this is why most drivers allocate buffers ahead of time, even
when they don't otherwise need to do so.  If you know the max size buffer
you need then allocating it ahead of time might be the best bet for now.
Otherwise you will need a process context (usb_add_task would work).

Matthew Orgass
darkstar@city-net.com