Parallel port and Linux

Parallel port and Linux

Post by Peter Kelle » Mon, 18 Sep 2000 04:00:00



Hello,

I have some questions concerning the Parallel Port under the 2.4 kernel.

I am building a hardware device to connect to the parport of my computer
and I would like to use EPP mode. However, when I compile the parport
and "PC-Style" and "foreign hardware" options in, the parport is only
detected to be in PCSPP and TRISTATE mode. kernel 2.2.17 can detect the
EPP mode, however. I am forced to use 2.4 because some PCI cards I have
are only supported on 2.4.

Also, when I manually set the parallel port's ioport to 0x378 instead
of letting the bios do it, one of my PCI net cards gets an irq of zero
and refuses to work. *boggle*. The irqs should be different(and they are
specifically different in my kernel init args), I am at a complete loss
for why this happens.

I'm using parport=0x378,5 in my kernel arguments(along with some other
stuff for initializing of the two ether cards I have).

Could someone please recommend me some sites where I could find out
how to write software to interface to the parport? I'm not looking to
write kernel level drivers here...

I have some test programs that must run as root and use outb and inb,
but there must be a better way of doing it.

Thank you.

--
-pete

E-mail address corrupted to stop spam.
Reply mail: psilord at cs dot wisc dot edu
I am responsible for what I say, noone else.

 
 
 

Parallel port and Linux

Post by Peter Kelle » Tue, 19 Sep 2000 14:00:00


: Also, when I manually set the parallel port's ioport to 0x378 instead
: of letting the bios do it, one of my PCI net cards gets an irq of zero
: and refuses to work. *boggle*. The irqs should be different(and they are
: specifically different in my kernel init args), I am at a complete loss
: for why this happens.

Well, after messing with it for a few hours I get one of these two states:

1) Parallel port failed to be detected at 0x378, ethernet card initialized
correctly.

2) Parallel port identified correctly, ethernet card has irq 0. If I use
pci=biosirq, the kernel goes into an infinite loop spitting out bracketed
hex numbers. Even though the parport seems identified, reading any values
from it results in 0xff.

The parport is specified to go to irq 5, and one ethercard is set to 7
and the other to 9. I set the PCI slots to hard irq values in the bios
and turned off PnP.

I have a pci trident video card, and two pci LNE100TX ethernet cards in
the machine, that's it.

I'm still at a loss for why this doesn't work.

Any help would be appreciated.

--
-pete

E-mail address corrupted to stop spam.
Reply mail: psilord at cs dot wisc dot edu
I am responsible for what I say, noone else.

 
 
 

Parallel port and Linux

Post by Peter Kelle » Wed, 20 Sep 2000 15:15:20


Well, I managed to mostly solve it on my own after a few hours. It
seems I had an io port conflict. I can't tell what the conflict was,
there doesn't seem to be any record of it when I reproduce it.
Also cat /proc/ioports showed nothing else using that range... Hmm...

I moved the base address of the parallel port from 0x278 to 0x3bc and
suddenly the kernel recognized it AND the ethernet cards too.

I also say mostly solved because even though the bios thinks the parport is
EPP it is only detected as a PCSPP,TRISTATE.

Oh well. I'll just mess with it some more and hopefully figure it out.
At least my test program gives me the right numbers now.

I figured I'd post the solution here anyway just so lurkers who follow
this thread get some information that might prove useful.

-pete