From owner-freebsd-hackers Wed Dec 2 20:10:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA22975 for freebsd-hackers-outgoing; Wed, 2 Dec 1998 20:10:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA22964; Wed, 2 Dec 1998 20:10:26 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:I3OOfWtnDYmiOxaRVXYhIIGiq7X/idr3@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.1/8.9.1) with ESMTP id NAA08582; Thu, 3 Dec 1998 13:10:02 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id NAA27727; Thu, 3 Dec 1998 13:11:51 +0900 (JST) Message-Id: <199812030411.NAA27727@zodiac.mech.utsunomiya-u.ac.jp> To: Nick Hibma , sos@FreeBSD.ORG cc: hackers@FreeBSD.ORG, jkh@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: major/minor numbers In-reply-to: Your message of "Tue, 01 Dec 1998 14:30:04 +0100." References: Date: Thu, 03 Dec 1998 13:11:50 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >For USB support I need at least 1 but possible 3 or more major numbers. > > usb0 > >and possibly > > ums0 > ulpt0 > ucuaa0 (maybe) We shall be needing major numbers for the ISA AT keyboard and the USB keyboard too. With USB, we can have multiple keyboards together with the standard ISA AT keyboard. The user will use either one keyboard for his/her console and may use the other keyboards as auxiliary input device. We need device nodes for them. It won't be long before this will happen; I am currently working on splitting and generalizing keyboard I/O code from syscons and implementing mechanisms for syscons to use whatever keyboard available in the system, and the other keyboard will be made readable via a cdev device driver. Nick and Soeren, I will be sending you a snapshot of the experimental code to you tonight. It's almost finished :-) >Brian Feldman came up with the idea to use major numbers together with >other drivers, for example have ums use the numbers that also psm uses >(their both PS/2 mice). Anyone tried this? Sounds a bit odd if you do >not want to divide minor number space amongst them statically. I may be wrong, but, my understanding is... When the kernel accesses device driver functions, it will invoke them as: (*cdevsw[major(dev)]->d_open)(dev); This means if we are to share a major number between different drivers, we need to have a way to multiplex access to the drivers via a single major number. Do we have such mechanisms in our kernel now? Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message