Re: Panic with ugen

From: Jay Cornwall <jay_at_evilrealms.net>
Date: Thu, 27 Nov 2003 00:08:53 +0000
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
Received on Wed Nov 26 2003 - 15:08:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:31 UTC