Subject: kern/19803: usbd_alloc_buffer fails often
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 01/12/2003 12:21:56
>Synopsis: usbd_alloc_buffer fails often
>Arrival-Date: Sat Jan 11 19:23:00 PST 2003
>Originator: IWAMOTO Toshihiro
>Release: NetBSD 1.6L
System: NetBSD pepper.my.domain 1.6L NetBSD 1.6L (PEPPER) #111: Sat Jan 11 00:53:18 JST 2003 firstname.lastname@example.org:/sys/arch/i386/compile/PEPPER i386
umass ATTACH and ulpt_do_write need to allocate some memory,
but this fails often. See kern/19326 for the umass case.
For ulpt, write(2) returns ENOMEM.
Use enough memory (using X with gnome, emacs, mozilla... seems to
be enough for my system (with 512M ram)) so that kernel memory
Then plug a umass device or try to print something through ulpt.
Then terminate mozilla to free some memory and try again. They
usbd_alloc_buffer calls ohci_allocm to allocate memory,
which after all calls bus_dmamem_alloc(..., BUS_DMA_NOWAIT) in
(This is my speculation and I haven't confirmed. Memory allocation
failures might be happening elsewhere.)
I guess bus_dmamem_alloc with BUS_DMA_WAITOK would fix this problem,
but doing this isn't trivial for me.