From nobody@FreeBSD.org  Mon Jan 12 15:10:54 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A6DB316A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jan 2004 15:10:54 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A540E43D46
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jan 2004 15:10:46 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0CNAkdL012304
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Jan 2004 15:10:46 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0CNAkNO012303;
	Mon, 12 Jan 2004 15:10:46 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401122310.i0CNAkNO012303@www.freebsd.org>
Date: Mon, 12 Jan 2004 15:10:46 -0800 (PST)
From: Alexander Bussman <buxman@telia.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: USB joystick/gamepad 
X-Send-Pr-Version: www-2.0

>Number:         61278
>Category:       i386
>Synopsis:       USB joystick/gamepad
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 12 15:20:11 PST 2004
>Closed-Date:    Tue Jan 13 02:42:58 PST 2004
>Last-Modified:  Tue Jan 13 02:50:26 PST 2004
>Originator:     Alexander Bussman
>Release:        5.2
>Organization:
>Environment:
FreeBSD zstudios.org 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Mon Jan 12 22:44:50 CET 2004     bux@zstudios.org:/usr/obj/usr/src/sys/MYWAY  i386
>Description:
First I have to say that it might be a bug in devfs or what it's called in FreeBSD (just moved from GNU/Linux to FreeBSD). When I'm booting with my gamepad connected to the usb port it finds it at the device ugen0 but I have to have it on uhid0 so I have to unplug it and reattach it, then the uhid0 device is created.

Oh well, the biggest problem is that if I use the gamepad in for example zsnes to play some old classic snes games. After a few minutes (sometimes just one minute and sometimes more then 10 minutes) it stops responding and when I exit the application everything locks up and after a few seconds the system reboots automatically.
>How-To-Repeat:
For the first problem (devfs), just boot with the gamepad connected.

For the other problem:
Launch zsnes (or another program that uses the gamepad) and start play a game (using the gamepad ofcourse).

>Fix:

>Release-Note:
>Audit-Trail:

From: Alexander Bussman <buxman@telia.com>
To: freebsd-gnats-submit@FreeBSD.org, buxman@telia.com
Cc:  
Subject: RE: i386/61278: USB joystick/gamepad
Date: Tue, 13 Jan 2004 00:26:11 +0100

 After some more investigations I found out that that gamepad gets 
 disconnected and reattached byitself from time to time (if probably when 
 it gets disconnected the program lock ups).
 
 When it get reattached the device /dev/uhid0 gets recreated with 0644 
 permissions and it should be 0664 (for me atleast).
 
 So I guess the main problem is the devfs problem...

From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To: Alexander Bussman <buxman@telia.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: i386/61278: USB joystick/gamepad
Date: Tue, 13 Jan 2004 11:32:37 +0100

 Alexander Bussman <buxman@telia.com> writes:
 > First I have to say that it might be a bug in devfs or what it's
 > called in FreeBSD (just moved from GNU/Linux to FreeBSD). When I'm
 > booting with my gamepad connected to the usb port it finds it at the
 > device ugen0 but I have to have it on uhid0 so I have to unplug it
 > and reattach it, then the uhid0 device is created.
 
 If the ugen driver is loaded before the uhid driver and the gamepad is
 already connected, ugen will claim the gamepad.  Just make sure uhid
 is compiled into the kernel or loaded at boot time (uhid_load=3D"yes" in
 /boot/loader.conf) so it gets a chance to claim the gamepad before
 ugen does.
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no
State-Changed-From-To: open->closed 
State-Changed-By: des 
State-Changed-When: Tue Jan 13 02:42:57 PST 2004 
State-Changed-Why:  
Not a PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61278 

From: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To: Alexander Bussman <buxman@telia.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: i386/61278: USB joystick/gamepad
Date: Tue, 13 Jan 2004 11:42:37 +0100

 >  When it get reattached the device /dev/uhid0 gets recreated with 0644=20
 >  permissions and it should be 0664 (for me atleast).
 
 Add the following to /etc/rc.local:
 
 devfs ruleset 10
 devfs rule add path uhid* mode 0664
 devfs rule applyset
 
 see devfs(8) for details.
 
 In the future, please raise this kind of problem on the mailing lists
 instead of filing a PR.
 
 DES
 --=20
 Dag-Erling Sm=F8rgrav - des@des.no
>Unformatted:
