Subject: Re: USB Drive Howto
To: None <current-users@NetBSD.org, tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: current-users
Date: 03/01/2004 16:00:34
On Tue, Dec 16, 2003 at 03:22:28PM +1100, Daniel Carosone wrote:
> On Tue, Dec 16, 2003 at 01:35:32PM +1000, George Michaelson wrote:
> > oddly, attach/detach cycles AFTER a reboot connected USB is there are usually
> > ok. I just don't get it. maybe lower level probe logic during kernel init phase
> > isn't the same as usertime probe in USB.
> 
> The basic cause of the problem is well known - it comes down to memory
> fragmentation, the kernel needs to allocate a contiguous chunk of
> memory for the scsibus at the time its created.  On a system that has
> been running a while, especially with smaller memory, sometimes it
> can't find a large enough chunk to use.

Incidentally, fragmentation may keep ath(4) from attaching,
too---bus_dmamem_alloc fails, returning 12 = ENOMEM.  The error message is
"ath0: unable to allocate control data, error = 12".

Looks to me like ath tries to allocate 4796 bytes for its control data.

What is the solution?

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933