Bug 33712

Summary: Duplicate make_dev panic in ugen.c + patch
Product: Base System Reporter: ak03 <ak03>
Component: kernAssignee: joe <joe>
Status: Closed FIXED    
Severity: Affects Only Me CC: joe
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description ak03 2002-01-08 23:20:01 UTC
	It is possible to get the "duplicate make_dev: Don't do that" panic
	in ugen.c if USB device has not been recognised or is failed to attach 
	for the first time, because ugen_attach functions always attempts
	to create make_dev but fails to clean-up after itself on failure.

Fix: Proposed patch moves control device node creation/destruction
	into ugen_make_devnodes/ugen_destroy_devnodes functions
	respectively. This way device nodes are not created unless
	device probe is finished successfully and the whole problem
	is just eliminated. Also has nice side effect of removing
	some ugly __FreeBSD__ ifdefs.
How-To-Repeat: 	Get crappy motherboard with which USB interrupt delivery is not working
	at the hardware probing time but works just fine as soon an system
	reaches multi-user mode and buy a Microsoft IntelliMouse USB?
	Interrupts problem will be reported separately.
Comment 1 joe freebsd_committer freebsd_triage 2002-01-08 23:21:06 UTC
Responsible Changed
From-To: freebsd-bugs->joe

I'll take this.  Thanks.
Comment 2 ak03 2002-05-14 15:40:08 UTC
Please ignore the patch in this PR. It stops panics if ugen attach 
fails, but introduces a new one if
attach was successfull.

Or close this PR altogether.
Comment 3 Alexander Kabaev freebsd_committer freebsd_triage 2002-07-22 20:21:28 UTC
State Changed
From-To: open->closed

The patch is bogus. The problem has been dealt with in a better 
way. Closed at originator request.