From owner-freebsd-stable Tue Aug 29 5: 9:26 2000 Delivered-To: freebsd-stable@freebsd.org Received: from arg1.demon.co.uk (arg1.demon.co.uk [194.222.34.166]) by hub.freebsd.org (Postfix) with ESMTP id 60C7337B43F for ; Tue, 29 Aug 2000 05:09:01 -0700 (PDT) Received: from localhost (arg@localhost) by arg1.demon.co.uk (8.8.8/8.8.8) with ESMTP id NAA11050 for ; Tue, 29 Aug 2000 13:08:50 +0100 (BST) (envelope-from arg@arg1.demon.co.uk) Date: Tue, 29 Aug 2000 13:08:50 +0100 (BST) From: Andrew Gordon X-Sender: arg@server.arg.sj.co.uk To: stable@freebsd.org Subject: lpt - newbus breakage? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The lpt driver has a bunch of flags in the high bits of the minor device number which affect device behaviour. Most of these appear to have been broken since newbus - if you create the /dev node and try to open it, you get "Device not configured", and the lptopen() entry point in the driver doesn't get called. The following fixes it for the specific case I am interested in: Index: lpt.c =================================================================== RCS file: /repository/src/sys/dev/ppbus/lpt.c,v retrieving revision 1.15.2.3 diff -c -r1.15.2.3 lpt.c *** lpt.c 2000/07/07 00:30:40 1.15.2.3 --- lpt.c 2000/08/29 11:29:28 *************** *** 417,422 **** --- 417,424 ---- UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", unit); make_dev(&lpt_cdevsw, unit | LP_BYPASS, UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", unit); + make_dev(&lpt_cdevsw, unit | LP_PRIMEOPEN, + UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.reset", unit); return (0); } but full coverage of the combinations of the 4 option bits would need 16 such entries. Even omitting combinations that have no obvious use gives 7 entries. Is this how things are meant to be done? What about drivers that pack a ton of info into the minor device? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message