[Linux-parport] Auto detection vs specifying ports

kuba kubusg at gmail.com
Thu Jan 23 13:11:55 EST 2014


  Hi,

I have a pci parallel port card based on CH353L chip and built in 
parallel port. When I load parport_pc, It sucessfully finds built in 
parallel port but does not recognize the card. If I specify ports for 
the card and built in pport, It successfully finds my card but not the 
built in pport.

When I look at parport_pc_init function:

3296         if (io[0]) {
3297                 int i;
3298                 /* Only probe the ports we were given. */
3299                 user_specified = 1;
3300                 for (i = 0; i < PARPORT_PC_MAX_PORTS; i++) {
3301                         if (!io[i])
3302                                 break;
3303                         if (io_hi[i] == PARPORT_IOHI_AUTO)
3304                                 io_hi[i] = 0x400 + io[i];
3305                         parport_pc_probe_port(io[i], io_hi[i],
3306                                         irqval[i], dmaval[i], NULL, 0);
3307                 }
3308         } else
3309                 parport_pc_find_ports(irqval[0], dmaval[0])

it is autodetecting only if i don't specify ports. Why not search for 
specified ports and do autodetect?

if I do something like this:

              parport_pc_find_ports(irqval[0], dmaval[0])
3296         if (io[0]) {
3297                 int i;
3298                 /* Only probe the ports we were given. */
3299                 user_specified = 1;
3300                 for (i = 0; i < PARPORT_PC_MAX_PORTS; i++) {
3301                         if (!io[i])
3302                                 break;
3303                         if (io_hi[i] == PARPORT_IOHI_AUTO)
3304                                 io_hi[i] = 0x400 + io[i];
3305                         parport_pc_probe_port(io[i], io_hi[i],
3306                                         irqval[i], dmaval[i], NULL, 0);
3307                 }
3308         }

it works correctly (or is it?), I mean it detects both the card and the 
built in pport.

Kind regards,
Jakub Golebiewski




More information about the Linux-parport mailing list