Parallel port driver patch

From: Pavel Fedin
Date: Tue Oct 26 2004 - 02:46:44 EST


Hello, all!
First let me introduce myself. I live in Moscow and own Pegasos-II PowerPC-based computer from Genesi (www.pegasosppc.com). I wrote a patch for parallel port driver in 2.6.8 kernel to handle VIA8231 southbridge used in this machine and i'd like to offer the patch for including into future kernels.
This patch allows the kernel to configure port's mode without help of BIOS. It is needed on my machine because its firmware simply ignores the parallel port leaving in unidirectional SPP mode. The patch adds init_mode=spp|epp|ecp|ecpepp option to the kernel (when driver is linked statically into the kernel parameter name is parport_init_mode). If you omit the option the driver will read current 8231 configuration. This means that on PCs you can still use BIOS to configure the port.
Currently the patch itself is 100% working, i tried all modes and parport_pc driver recognises all of them and shows in /proc/sys/dev/parport/parport0 correctly except ECP+EPP (it is also not detected on all my PCs on which i tried Linux, so this is generic driver problem which i didn't find). ECP+EPP mode is detected as standalone ECP instead. But i left this option for experimental purposes.
Unfortunately the whole system still does not work, i tried my Genuis-HR6 parallel port scanner and parallel ZIP drive and both of them don't work. ZIP drive is detected properly but then suddenly gets offline. Scanner does not answer any command at all. But this is not due to the patch, without it the same thing happens. Obviously Pegasos has some more problems which are not discovered and not fixed yet.

--
Best regards,
Pavel Fedin, mailto:sonic_amiga@xxxxxxxxxx

Attachment: parport_pc-via8231.diff.gz
Description: GNU Zip compressed data