Skip to contentSkip to conversation

Parallel port problems on Sun Ultra10

DISCUSSION Christophe Jacquet 4 participants 6 messages Apr 9, 2006 – Apr 11, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I have an Ubuntu distribution running on a Sun Ultra10, with kernel 2.6.15. Printing causes the workstation to crash. Here are the steps I can reproduce:

1) Inserting the module "parport_pc":

I type "modprobe parport_pc", and I get the following output on the console:

parport0: PC-style at 0x1fff13043bc (0x1fff13047bc), irq 7567552<7>0x1fff13043bc: F
IFO is 16 bytes
0x1fff13043bc: readIntrThreshold is 8
, dma 0 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
parport0: Printer, Hewlett-Packard HP LaserJet 1100

This seems to be OK: the driver can communicate with the printer, since it retrieves its model string.

2) Inserting the module "lp"

I type "modprobe lp" and I just get the message:

lp0: using parport0 (interrupt-driven).

3) Testing the printer

When I type " echo 'Hello world' >/dev/lp0 ", I get the message:

lp0: ECP mode

The string gets printed on the printer.

Then, Linux crashes. I get no more messages. The Bash prompt never comes back. I can interact with OBP by hitting "Stop-A", and reboot the machine.

I hope this report will be useful. Thanks for any help you could give me. Best regards.

Christophe Jacquet.

#1 lore raw
Quoted 8 lines · Christophe Jacquet

When I type " echo 'Hello world' >/dev/lp0 ", I get the message:

lp0: ECP mode

The string gets printed on the printer.

Then, Linux crashes. I get no more messages. The Bash prompt never comes back. I can interact with OBP by hitting "Stop-A", and reboot the machine.

Hi,
this reminds me of a problem I had a few week ago while playing with an homebuild parallel port project. The machine would lock totally, but as soon as I disconnected the circuit from the port the machine would unlock.

Maybe you could try disconnecting the printer and see what happens?

Here are more details about the problem I observed:

When the parallel port interrupt is enabled, the machine hangs as long as the ACK pin is held low. I observed that the parport interrupt count in /proc/interrupt were higher after each hang.

It looks to me like the parport interrupt is level triggered instead of edge triggered. I wanted try on x86 hardware to see if the problem also happens before posting, but I decided to post anyway when I saw this message.

I observed this on a 2.6.16-rc6-git-something.

Regards,
Raphael Assenat

#2 lore raw
In reply to Christophe Jacquet

Hi,

Quoted 6 lines

this reminds me of a problem I had a few week ago while playing with an homebuild parallel port project. The machine would lock totally, but as soon as I disconnected the circuit from the port the machine would unlock.

Maybe you could try disconnecting the printer and see what happens?

I reproduced the steps described in my previous post, but I tried various things after the machine froze:

1) I swicthed off the printer's power supply: the machine remained frozen,
2) I disconnected the printer cable: the machine remained frozen,
3) I switched on the printer again, and I reconnected the cable: the machine remained frozen.

So the machine seems to be locked for good after doing a write() to /dev/lp0.

Regards,

Christophe Jacquet.

#3 lore raw
In reply to Christophe Jacquet

Hi,

Quoted 2 lines

I have an Ubuntu distribution running on a Sun Ultra10, with kernel 2.6.15. Printing causes the workstation to crash.

I have a few updates on the problem.

1) Here is a rough "stack trace" of the crash:
It happens in the function parport_write()
Called from lp.c, function lp_write(), line 343.

2) Setting CONFIG_PARPORT_1284 to false solves the issue.

Regards,

Christophe Jacquet.

#4 lore raw
In reply to Christophe Jacquet

From: Christophe Jacquet <[email protected]>
Date: Mon, 10 Apr 2006 17:36:48 +0200

Quoted 7 lines

I have a few updates on the problem.

1) Here is a rough "stack trace" of the crash:
It happens in the function parport_write()
Called from lp.c, function lp_write(), line 343.

2) Setting CONFIG_PARPORT_1284 to false solves the issue.

Thanks for tracking this down so far, I'll try to figure out what's going wrong.

#5 lore raw
In reply to Christophe Jacquet
Quoted 5 lines · David S. Miller

From: Christophe Jacquet <[email protected]>
Date: Mon, 10 Apr 2006 17:36:48 +0200

Quoted 2 lines

I have a few updates on the problem.

Quoted 8 lines
Quoted 5 lines

1) Here is a rough "stack trace" of the crash:
It happens in the function parport_write()
Called from lp.c, function lp_write(), line 343.

2) Setting CONFIG_PARPORT_1284 to false solves the issue.

Thanks for tracking this down so far, I'll try to figure out what's going wrong.

We have "solved" this problem in Debian by disabling the CONFIG_PARPORT_PC_FIFO option in kernel. There is some relevant information in the thread starting at

http://lists.debian.org/debian-sparc/2006/03/msg00026.html

Best regards,

Jurij Smakov [email protected]
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC