Re: [patch] parport-arca-16 (fwd)

Ely Wilson (plexus@ionet.net)
Fri, 9 Oct 1998 18:56:33 -0500 (CDT)


I have a PLIP connection between a Desktop and a Laptop, where the laptop
acts as a really simple firewall, email and file server. I upgraded the
kernel on the laptop to 2.1.124 and the PLIP code is broken.

Here, I haven't completely looked through this diff i have, because
basically the diff is teh same size as teh plip.c in 2.0.35 (this diff is
2.0.35 against 2.1.124, also this is only a section [need i say that?])

+plip_init_dev(struct device *dev, struct parport *pb))
{
struct net_local *nl;
- int iosize = (PAR_DATA(dev) == 0x3bc) ? 3 : 8;
+ struct pardevice *pardev;

- /* Check region before the probe */
- if (check_region(PAR_DATA(dev), iosize) < 0)
- return -ENODEV;
+ dev->irq = pb->irq;
+ dev->base_addr = pb->base;

- /* Check that there is something at base_addr. */
- outb(0, PAR_DATA(dev));
- udelay(1000);
- if (inb(PAR_DATA(dev)) != 0)
+ if (pb->irq == -1) {
+ printk(KERN_INFO "plip: %s has no IRQ.\n", pb->name);
return -ENODEV;
-
- printk(version);

The problem is that the when whoever (sue me) merged parport and plip
together they felt that checking for a valid irq line was enough to verify
that the port was useful. The old code (-) from 2.0.35 works fine on SPP
and 'generic Parallel' ports. e.g. paraports with no assigned irq.

Unfortunately not every system has teh ability to dedicate an
irq to a lpt port. Such is the laptop here, which is an Austin 486dx2 66
with a mere 24Mb and a lil old 300Mb HD.

If anyone more experienced with paraport code or plip code could so kindly
offer a fix i'd be gracious, until then I'm fiddling with source I know
little about.

%--* ely % Must suck to be me.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/