Still debugging why open(/dev/lpt0...) hangs

2006-07-21 Thread george+freebsd
lpt0 is hanging up when it tries to request the ppbus (line 478 of
lpt.c).  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 this should happen.
What can I call in lpioctl (if_plip.c line 302) to print out some
identifying information about the process doing the ioctl?  Or is
there a better list somewhere to ask this question?
-- George Mitchell

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 6: open(/dev/lpt0, O_WRONLY) hangup fixed

2006-07-20 Thread george+freebsd
I've solved my /dev/lpt0 problem.  Here is what happened:

1. I observed that the problem is also happening on FreeBSD 6.0.
2. It isn't happening on 5.3.
3. I sprinkled some printf's into lptopen in sys/dev/ppbus/lpt.c.
4. I compiled a new kernel, stripping a whole bunch of stuff out
   of the generic kernel.  The problem went away.
5. I went back to the original lpt.c.  Still working.
6. I compiled another kernel, adding device plip back in.  The
   problem came back.

So the problem, whatever it is, seems to involve an interaction
between printing and plip.  Since I have printing working again,
debugging the problem is no longer a high priority for me.  But
if anyone has some suggestions for debugging, I would be happy to
try them this weekend.

Am I the only dinosaur still using a parallel port printer?  It
seems incredible to me that no one else using 6.0/6.1 could have
encountered this problem.  Even though I have fixed the problem,
it should probably be debugged properly, unless there's sentiment
for removing device plip from the generic kernel.
-- George Mitchell

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FreeBSD 6.1: open(/dev/lpt0, O_WRONLY) hangs up

2006-07-19 Thread george+freebsd
Print jobs get into my print queu, but they don't get out.  So I started
debugging lpd.  After a lot of screwing around, I discovered that the
program was hanging up on line 1875 of printjob.c:

pfd = open(pp-lp, pp-rw ? O_RDWR : O_WRONLY);

pp-lp is /dev/lpt0
pp-rw is 0

So then I returned to my shell prompt and typed in:

cat /dev/null /dev/lpt0

and that hung up uninterruptibly.  What's going on?

FreeBSD 6.1-RELEASE, unmodified generic kernel.  All this worked normally
under 5.3, though that needed 'hw.intr_storm_threshold=2000'.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


P.S. FreeBSD 6.1: open(/dev/lpt0, O_WRONLY) hangs up

2006-07-19 Thread george+freebsd
P.S. Here's what dmesg has to say about my parallel port:

ppc0: ECP parallel printer port port 0x378-0x37f,0x778-0x77b irq 7 drq 3 on 
acpi0
ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
ppbus0: Parallel port bus on ppc0
ppbus0: IEEE1284 device found /NIBBLE/ECP
Probing for PnP devices on ppbus0:
ppbus0: OKI DATA CORP OKIPAGE 10ex PJL,PCLXL,PCL,EPSONFX,IBMPPR
plip0: PLIP network interface on ppbus0
lpt0: Printer on ppbus0
lpt0: Interrupt-driven port
ppi0: Parallel I/O on ppbus0


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


More FreeBSD 6.1: open(/dev/lpt0, O_WRONLY) hangs up

2006-07-19 Thread george+freebsd
More information about my /dev/lpt0 problem:

1. Enabling or disabling ACPI has no effect.
2. If I boot up in single user mode, I can cat a file to /dev/lpt0
and it prints on the printer.
3. Once I go to mutliuser mode, open(/dev/lpt0,O_WRONLY) hangs
forever whether I start lpd or not.
4. If I shutdown now to get back to single user mode and then
cat datafile /dev/lpt0, it hangs until I type control-C, at which
point the shell says: cannot create /dev/lpt0: Interrupted system call
(which really means, looking at the code in /usr/src/bin/sh/redir.c,
cannot OPEN /dev/lpt0).

Help!  -- George Mitchell

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]