Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2006 22:46:52 -0700 (PDT)
From:      george+freebsd@m5p.com
To:        freebsd-hackers@freebsd.org
Subject:   FreeBSD 6.0/6.1: open ("/dev/lpt0" ...) hangs up
Message-ID:  <200607220546.k6M5kq59001314@m5p.com>

next in thread | raw e-mail | index | archive | help
A couple of days ago, I upgraded from FreeBSD 5.3 to 6.1 (installed
on a previously unused disk partition).  Happiness ensued for the
most part, but I could not get printing to work at all with the
generic kernel.

I played around for a while and eventually found that
open ("/dev/lpt0" ...) would hang up.  But if I tried it in single
user mode, it worked fine.  I could even "cat foo.txt >/dev/lpt0"
in single user mode and print.  But as soon as I went multi-user,
no joy.

I compiled a custom kernel, kicking out all sorts of stuff I didn't
need, and then everything started working.  But I could make it go
bad again by putting "device plip" back in.  With that kernel, as
before, I could open /dev/lpt0 in single-user mode but not in multi-
user mode.  Specifically, it's hanging up when it tries to request
the ppbus (line 478 of lpt.c) (as determined from the printfs I
sprinkled in).  I'm guessing that if_plip.c has requested it and not
released it, which apparently happens when there's been an ioctl on
the plip.  There's no plausible reason why anythhing should be
happeneing on plip, as far as I can tell.  What can I call in lpioctl
(if_plip.c line 302) to print out some identifying information
about the process doing the ioctl? 

This problem is also present in 6.0.  Why haven't a whole bunch of
people already run into it?  Am I the only person still using a
parallel port printer and (at first) a generic kernel?

-- George Mitchell




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607220546.k6M5kq59001314>