[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#279174: Adding VIA8231 support for parallel port driver



Package: kernel-source-2.6.8
Tags: patch

 This is a patch which adds VIA8231 southbridge support to version 2.6.8 of the kernel.
 The patch adds the following possibilities:
 1. Autodetect and use IRQ and DMA.
 2. Set mode for parallel port (SPP, PS2, EPP, ECP or ECP+EPP). This is necessary on Pegasos machines because their firmware does not have any options to configure the parallel port and always leave it in unidirectional SPP mode. But the patch also functions on any machine with VIA8232 southbridge and allows probably better control than BIOS options (for example PC BIOS does not often distinguish between SPP ans PS2 modes).
 Notes on usage:
 To configure the port you need to:
- if parport_pc driver is compiled as a module: specify parport_pc init_mode=[spp|ps2|epp|ecp|ecpepp] in /etc/modules file (for Debian Linux).
- if the driver is linked statically with the kernel: specify parport_init_mode=[spp|ps2|epp|ecp|ecpepp] in kernel's arguments.
- to enable using DMA (makes sense only on ECP mode) you also need to specify dma=auto in driver's arguments (it defaults to dma=none).
This patch is intended for use primarily on Pegasos machines but it will work on any computer with VIA8231 south bridge. In this case it will override BIOS setting if you tell the driver to configure the port. BIOS setting will be honored if you omit init_mode parameter.
Technical details:
1. On Pegasos standard port settings (set by OpenFirmware) are: IRQ=7, DMA=3, base address=0x3BC, mode is unidirectional SPP.
2. The patch changes only port mode, all other settings are preserved. So if you have a PC with VIA8231 and use driver to configure the port you'll still be able to change IRQ, DMA and base address in BIOS and these settings will be kept.
3. One exclusion: if you tell the driver to turn on EPP mode (specify epp or ecpepp value) and if default base address is 0x3BC (this is the case on Pegasos) the port will be moved to 0x378. EPP port can't have 0x3BC as the base.
 Known problems:
1. ECP+EPP mode is strange, it doesn't work even on several PC's i tested with Linux. ECP mode is detected and EPP is not. So if you get the same thing, it's not my fault. I just have no time to deal with it, current result is enough for me.
2. Not all devices  work on Pegasos, 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. Without the patch the same thing happens. Obviously Pegasos has some more problems which are not discovered and not fixed yet.
 This patch was already sent to Linux kernel mailing list and they asked me to merge the code with via686a support. I did it, this is the latest version. I posted it to lkml also but got no reply.

-- 
Best regards,
Pavel Fedin,									mailto:sonic_amiga@rambler.ru

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


Reply to: