NetBSD Problem Report #18450

Received: (qmail 24384 invoked by uid 605); 28 Sep 2002 18:00:47 -0000
Message-Id: <200209281800.g8SI0e920695@nyx.tn.catvmics.ne.jp>
Date: Sun, 29 Sep 2002 03:00:40 +0900 (JST)
From: t-nkyma@tcp-ip.or.jp
Sender: gnats-bugs-owner@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: USB related charactor devices are missing on sparc64
X-Send-Pr-Version: 3.95

>Number:         18450
>Category:       port-sparc64
>Synopsis:       USB related charactor devices are missing on sparc64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 28 18:01:00 +0000 2002
>Closed-Date:    Sat Sep 28 20:25:58 +0000 2002
>Last-Modified:  Sat Sep 28 20:25:58 +0000 2002
>Originator:     Takeshi Nakayama
>Release:        NetBSD 1.6
>Organization:
Private
>Environment:
System: NetBSD nyx 1.6 NetBSD 1.6 (NYX32) #39: Fri Sep 27 18:42:10 JST 2002
 takeshi@nyx:/usr/src/sys/arch/sparc64/compile/NYX32 sparc64
Architecture: sparc
Machine: sparc64
>Description:
	Recent models of sparc64 have USB and we support it. But
	charactor devices are missing.
>How-To-Repeat:
	use usbdevs(8) on sparc64
>Fix:
	Add the charactor devices, like the following patch.

Index: etc/etc.sparc64/MAKEDEV
===================================================================
RCS file: /cvsroot/basesrc/etc/etc.sparc64/MAKEDEV,v
retrieving revision 1.39
diff -u -d -u -r1.39 MAKEDEV
--- etc/etc.sparc64/MAKEDEV	2002/08/16 17:56:56	1.39
+++ etc/etc.sparc64/MAKEDEV	2002/09/10 03:12:36
@@ -46,6 +46,7 @@
 #	std	standard devices
 #	local	configuration specific devices
 #	isdns	make ISDN devices
+#	usbs	make USB devices
 # Tapes:
 #	st*	SCSI tape
 # Disks:
@@ -65,6 +66,14 @@
 # Pseudo terminals:
 #	pty*	set of 62 master and slave pseudo terminals
 #	opty	first 16 ptys, to save inodes on install media
+# USB devices:
+#	usb*	Bus control devices used by usbd for attach/detach
+#	uhid*	Generic HID devices
+#	ulpt*	Printer devices
+#	ugen*	Generic device
+#	urio*	Diamond Rio 500
+#	uscanner*	Scanners
+#	ttyU*	Modem
 # ISDN devices:
 #	isdn	communication between userland isdnd and kernel
 #	isdnctl	control device
@@ -98,6 +107,7 @@

 dialin=0
 dialout=524288		# high bit of the minor number
+callunit=262144

 PATH=/sbin:/bin/:/usr/bin:/usr/sbin:/usr/etc
 umask 77
@@ -133,6 +143,7 @@
 	sh -$- $0 cgeight0 tcx0
 	sh -$- $0 scsibus0 scsibus1 scsibus2 scsibus3
 	sh -$- $0 ipl lkm random local
+	sh -$- $0 usbs
 	sh -$- $0 isdns
 	sh -$- $0 pci0 pci1 pci2 pci3 pci4 pci5 pci6 pci7
 	sh -$- $0 clockctl
@@ -522,6 +533,94 @@
 	rm -f isdntrc$unit
 	mknod isdntrc$unit c 75 $unit
 	chmod 600 isdntrc$unit
+	;;
+
+usbs)
+	makedev usb usb0 usb1 usb2 usb3 usb4 usb5 usb6 usb7
+	makedev uhid0 uhid1 uhid2 uhid3
+	makedev ulpt0 ulpt1
+	makedev ttyU0 ttyU1
+	makedev urio0
+	makedev uscanner0 uscanner1
+	;;
+
+usb*)
+	unit=${i#usb}
+	if [ "$unit" = "" ]; then
+	    unit=255
+	    usb=usb
+	else
+	    usb=usb$unit
+	fi
+	major=78
+	rm -f $usb
+	mknod $usb c $major $unit
+	chmod 600 $usb
+	;;
+
+uhid*)
+	unit=${i#uhid}
+	uhid=uhid$unit
+	major=79
+	rm -f $uhid
+	mknod $uhid c $major $unit
+	chmod 666 $uhid
+	;;
+
+ulpt*)
+	unit=${i#ulpt}
+	ulpt=ulpt$unit
+	ulpn=ulpn$unit
+	major=80
+	rm -f $ulpt $ulpn
+	mknod $ulpt c $major $unit
+	mknod $ulpn c $major $(($unit + 64))
+	chmod 600 $ulpt $ulpn
+	;;
+
+ugen*)
+	unit=${i#ugen}
+	ugen=ugen$unit
+	major=81
+	for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
+	do
+		ugenj=$ugen.$j
+		rm -f $ugenj
+		mknod $ugenj c $major $(($unit * 16 + $j))
+		chmod 600 $ugenj
+	done
+	;;
+
+ttyU*)
+	unit=${i#ttyU}
+	ttyU=ttyU$unit
+	dtyU=dtyU$unit
+	ctyU=ctyU$unit
+	major=82
+	rm -f $ttyU $dtyU $ctyU
+	mknod $ttyU c $major $(($unit + $dialin  ))
+	mknod $dtyU c $major $(($unit + $dialout ))
+	mknod $ctyU c $major $(($unit + $callunit))
+	chown uucp $ttyU $dtyU $ctyU
+	chmod 600 $ttyU $dtyU $ctyU
+	;;
+
+urio*)
+	unit=${i#urio}
+	urio=urio$unit
+	major=83
+	rm -f $urio
+	mknod $urio c $major $unit
+	chmod 600 $urio
+	;;
+
+uscanner*)
+	unit=${i#uscanner}
+	uscanner=uscanner$unit
+	major=84
+	rm -f $uscanner
+	mknod $uscanner c $major $unit
+	chmod 600 $uscanner
 	;;

 pci*)
Index: sys/arch/sparc64/conf/majors.sparc64
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/sparc64/conf/majors.sparc64,v
retrieving revision 1.2
diff -u -d -u -r1.2 majors.sparc64
--- sys/arch/sparc64/conf/majors.sparc64	2002/09/06 13:22:12	1.2
+++ sys/arch/sparc64/conf/majors.sparc64	2002/09/10 03:12:43
@@ -56,6 +56,13 @@
 device-major	isdntrc		char 75			isdntrc
 device-major	isdntel		char 76			isdntel
 device-major	sabtty		char 77			sabtty
+device-major	usb		char 78			usb
+device-major	uhid		char 79			uhid
+device-major	ulpt		char 80			ulpt
+device-major	ugen		char 81			ugen
+device-major	ucom		char 82			ucom
+device-major	urio		char 83			urio
+device-major	uscanner	char 84			uscanner

 device-major	cgfourteen	char 99			cgfourteen

>Release-Note:
>Audit-Trail:

From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18450 CVS commit: syssrc/sys/arch/sparc64/conf
Date: Sat, 28 Sep 2002 22:46:47 +0300 (EEST)

 Module Name:	syssrc
 Committed By:	martin
 Date:		Sat Sep 28 19:46:47 UTC 2002

 Modified Files:
 	syssrc/sys/arch/sparc64/conf: majors.sparc64

 Log Message:
 Add entries for various USB character devices.
 From Takeshi Nakayama in PR 18450.


 To generate a diff of this commit:
 cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/sparc64/conf/majors.sparc64

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Martin Husemann <martin@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/18450 CVS commit: basesrc/etc/etc.sparc64
Date: Sat, 28 Sep 2002 22:49:35 +0300 (EEST)

 Module Name:	basesrc
 Committed By:	martin
 Date:		Sat Sep 28 19:49:35 UTC 2002

 Modified Files:
 	basesrc/etc/etc.sparc64: MAKEDEV

 Log Message:
 Add support for various USB character devices.
 From Takeshi Nakayama in PR 18450.


 To generate a diff of this commit:
 cvs rdiff -r1.39 -r1.40 basesrc/etc/etc.sparc64/MAKEDEV

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: martin 
State-Changed-When: Sat Sep 28 13:25:19 PDT 2002 
State-Changed-Why:  
Commited, thank you very much for the report! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.