From owner-freebsd-hackers Thu Dec 3 20:54:54 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA19247 for freebsd-hackers-outgoing; Thu, 3 Dec 1998 20:54:54 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA19242 for ; Thu, 3 Dec 1998 20:54:49 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA09862; Fri, 4 Dec 1998 15:24:27 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id PAA29053; Fri, 4 Dec 1998 15:24:03 +1030 (CST) Message-ID: <19981204152402.O441@freebie.lemis.com> Date: Fri, 4 Dec 1998 15:24:02 +1030 From: Greg Lehey To: Nick Hibma , FreeBSD hackers mailing list Subject: Re: major/minor numbers References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Nick Hibma on Tue, Dec 01, 1998 at 02:30:04PM +0100 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 1 December 1998 at 14:30:04 +0100, Nick Hibma wrote: > > For USB support I need at least 1 but possible 3 or more major numbers. > > usb0 > > and possibly > > ums0 > ulpt0 > ucuaa0 (maybe) > > 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. This would be a kludge, and would create something like Siamese twins, but it could be done. There are enough minor numbers to go around. You'd have to create some kind of dispatcher which decided on the driver based on the minor number. > Second question is: How many minor numbers can be stuck onto a major > number? 16, 256, 1024, 2^16, 2^32 ? 2^24. The BSD major/minor number is an outgrowth of the old Seventh Edition minor number, which had 8 bits major followed by 8 bits minor. BSD has put another 16 bits minor in front, so the minor mask is 0xffff00ff. By contrast, System V split to 14 bits major followed by 18 bits minor. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message