[Linux-parport] parport_pc and parport_serial probe interaction problem

Darryl L. Miles darryl at netbauds.net
Mon Dec 6 08:54:41 EST 2004



Auto probing with Kernel 2.6.9, I have a NetMos addin 2S+1P card.


The module tools and kernel load the modules in the order:

parport
parport_pc
parport_serial

With the kernel log output of:

PCI parallel port detected: 9710:9835, I/O at 0x8c00(0x9000)
parport0: PC-style at 0x8c00 (0x9000) [PCSPP(,...)]


I'm happy for them to autoprobe, however it appears that when parport_pc 
loads is detects the 1 Parallel port and grabs the resources that stop 
parport_serial from probing the same space later.  So I get no serial 
ports after parport_serial loads.  I am guessing that this is the 
problem, a resource grabbing can not probe type problem.


In looking at the parport_pc.c probe code, I see that when compiled into 
the kernel you can set io=0 which sets io[0] to PARPORT_DISABLE, and 
PARPORT_DISABLE is defined as the value (-2).  So if I run:

modprobe parport
modprobe parport_pc io=-2
modprobe parport_serial

With the kernel log output of:

PCI parallel port detected: 9710:9835, I/O at 0x8c00(0x0)
parport0: PC-style at 0x8c00 [PCSPP(,...)]
ttyS4 at I/O 0x8400 (irq = 20) is a 16550A
ttyS5 at I/O 0x8800 (irq = 20) is a 16550A


The machine correctly detects the serial ports, and appears to detect 
the parallel port too.

I just wanted to bring this to someones attention, I think the kernel 
should know about this situation and do the right thing during auto 
probe and be able to detect then both in either order with the 
cooperation of the other module.  Maybe the detection code wants to be a 
different C file and a new module that both parport_pc and 
parport_serial make use of, as there is a lot of duplicate cards listed 
in both modules.  The detection results are then retained by the 
detection module and the resources grabbed is one or more module grabs them.

My hardware from lspci -nv:

03:04.0 Class 0780: 9710:9835 (rev 01)
        Subsystem: 1000:0012
        Flags: medium devsel, IRQ 20
        I/O ports at 8400 [size=8]
        I/O ports at 8800 [size=8]
        I/O ports at 8c00 [size=8]
        I/O ports at 9000 [size=8]
        I/O ports at 9400 [size=8]
        I/O ports at 9800 [size=16]

lspci -vv

03:04.0 Communication controller: NetMos Technology 222N-2 I/O Card 
(2S+1P) (rev 01)
        Subsystem: LSI Logic / Symbios Logic: Unknown device 0012
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 20
        Region 0: I/O ports at 8400 [size=8]
        Region 1: I/O ports at 8800 [size=8]
        Region 2: I/O ports at 8c00 [size=8]
        Region 3: I/O ports at 9000 [size=8]
        Region 4: I/O ports at 9400 [size=8]
        Region 5: I/O ports at 9800 [size=16]


-- 
Darryl L. Miles





More information about the Linux-parport mailing list