Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Nov 2003 00:08:53 +0000
From:      Jay Cornwall <jay@evilrealms.net>
To:        Martin <nakal@web.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Panic with ugen
Message-ID:  <3FC54095.6030209@evilrealms.net>
In-Reply-To: <1069888991.2521.7.camel@klotz.local>
References:  <1069874342.704.18.camel@klotz.local> <3FC502B5.5020700@evilrealms.net> <1069888991.2521.7.camel@klotz.local>

next in thread | previous in thread | raw e-mail | index | archive | help
Martin wrote:

> It looks like this:

> panic()
> destroy_dev()
> ugen_destroy_devnodes()
> ugen_set_config()

Yes, that's the one, and I think I can see why. The existing code fixed devfs 
problems for normal ugen_set_config calls, but doesn't account for what 
happens when an error occurs (which is presumably happening in your example 
program, as you said it gives an error the first time round) - the devfs stuff 
only half completes.

(actually, looking at that error handling code, it doesn't look like it's been 
thought through well anyway - /* XXX should only do this after setting new 
altno has succeeded */ - maybe time to clean this code up?)

After the device endpoints are destroyed (sys/dev/ugen.c:1038), the returns on 
lines 1055 and 1058 need to be covered by a devnode recovery procedure - 
particularly tricky given we just wiped the endpoint descriptors clean.

I'll look at restructuring this code tomorrow, if Bernd doesn't beat me to it.

-- 
Cheers,
Jay

http://www.evilrealms.net/ - Systems Administrator & Developer
http://www.imperial.ac.uk/ - 3rd year CS student



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FC54095.6030209>