From owner-freebsd-hackers Thu Aug 13 19:10:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA01522 for freebsd-hackers-outgoing; Thu, 13 Aug 1998 19:10:46 -0700 (PDT) (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 TAA01498 for ; Thu, 13 Aug 1998 19:10:43 -0700 (PDT) (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 LAA03111; Fri, 14 Aug 1998 11:40:14 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id LAA19012; Fri, 14 Aug 1998 11:40:15 +0930 (CST) Message-ID: <19980814114015.K1921@freebie.lemis.com> Date: Fri, 14 Aug 1998 11:40:15 +0930 From: Greg Lehey To: Mike Smith , Karl Pielorz Cc: hackers@FreeBSD.ORG Subject: Re: Device / Driver presentation advice needed... References: <35D29E32.81A62F7D@tdx.co.uk> <199808131717.KAA00818@antipodes.cdrom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <199808131717.KAA00818@antipodes.cdrom.com>; from Mike Smith on Thu, Aug 13, 1998 at 10:17:47AM -0700 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 Thursday, 13 August 1998 at 10:17:47 -0700, Mike Smith wrote: >> Hi All, >> >> I'm now getting on quite well with the device driver I'm writing, but I'm stuck >> as to how best it is to present the 'device' to the outside world... >> >> If I reserve 3 bits of the minor number to indicate the actual card in the >> system, I can then use the remaining 5 bits to give different 'presentations' of >> the device (Is this good practice?) > > It's one way to do it. There is a lot more room in the minor though; > 32 bits in fact. 24 bits. The total 32 bit word includes 8 bits of major number. 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