Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2000 13:08:50 +0100 (BST)
From:      Andrew Gordon <arg@arg1.demon.co.uk>
To:        stable@freebsd.org
Subject:   lpt - newbus breakage?
Message-ID:  <Pine.BSF.4.21.0008291234240.10981-100000@server.arg.sj.co.uk>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0008291234240.10981-100000>