diff options
author | Ondrej Zary <linux@zary.sk> | 2023-01-23 20:09:54 +0100 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2023-01-31 01:34:41 +0100 |
commit | 246a1c4c6b7ffba88a2553d2b88f7b6280f253a2 (patch) | |
tree | 51572de71bfb670a0eb07277178a4da6fcb738e3 /Documentation/admin-guide | |
parent | ata: libata: exclude FUA support for known buggy drives (diff) | |
download | linux-246a1c4c6b7ffba88a2553d2b88f7b6280f253a2.tar.xz linux-246a1c4c6b7ffba88a2553d2b88f7b6280f253a2.zip |
ata: pata_parport: add driver (PARIDE replacement)
The pata_parport is a libata-based replacement of the old PARIDE
subsystem - driver for parallel port IDE devices.
It uses the original paride low-level protocol drivers but does not
need the high-level drivers (pd, pcd, pf, pt, pg). The IDE devices
behind parallel port adapters are handled by the ATA layer.
This will allow paride and its high-level drivers to be removed.
Unfortunately, libata drivers cannot sleep so pata_parport claims
parport before activating the ata host and keeps it claimed (and
protocol connected) until the ata host is removed. This means that
no devices can be chained (neither other pata_parport devices nor
a printer).
paride and pata_parport are mutually exclusive because the compiled
protocol drivers are incompatible.
Tested with:
- Imation SuperDisk LS-120 and HP C4381A (EPAT)
- Freecom Parallel CD (FRPW)
- Toshiba Mobile CD-RW 2793008 w/Freecom Parallel Cable rev.903 (FRIQ)
- Backpack CD-RW 222011 and CD-RW 19350 (BPCK6)
The following bugs in low-level protocol drivers were found and will
be fixed later:
Note: EPP-32 mode is buggy in EPAT - and also in all other protocol
drivers - they don't handle non-multiple-of-4 block transfers
correctly. This causes problems with LS-120 drive.
There is also another bug in EPAT: EPP modes don't work unless a 4-bit
or 8-bit mode is used first (probably some initialization missing?).
Once the device is initialized, EPP works until power cycle.
So after device power on, you have to:
echo "parport0 epat 0" >/sys/bus/pata_parport/new_device
echo pata_parport.0 >/sys/bus/pata_parport/delete_device
echo "parport0 epat 4" >/sys/bus/pata_parport/new_device
(autoprobe will initialize correctly as it tries the slowest modes
first but you'll get the broken EPP-32 mode)
Note: EPP modes are buggy in FRPW, only modes 0 and 1 work.
Signed-off-by: Ondrej Zary <linux@zary.sk>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'Documentation/admin-guide')
-rw-r--r-- | Documentation/admin-guide/blockdev/paride.rst | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Documentation/admin-guide/blockdev/paride.rst b/Documentation/admin-guide/blockdev/paride.rst index e1ce90af602a..e431a1ef41eb 100644 --- a/Documentation/admin-guide/blockdev/paride.rst +++ b/Documentation/admin-guide/blockdev/paride.rst @@ -2,6 +2,9 @@ Linux and parallel port IDE devices =================================== +Most of this document describes the old paride driver. For the new libata +pata_parport drivrer, jump to the section 4 at the end. + PARIDE v1.03 (c) 1997-8 Grant Guenther <grant@torque.net> 1. Introduction @@ -437,3 +440,52 @@ You might also find some useful information on the linux-parport web pages (although they are not always up to date) at http://web.archive.org/web/%2E/http://www.torque.net/parport/ + +4. pata_parport driver +====================== +pata_parport is a libata-based driver that uses the same low-level protocol +drivers as PARIDE but there are no high-level drivers (pd, pcd, pf, pt, pg). +The IDE devices behind parallel port adapters are handled by the ATA layer. + +The device creation is also changed - no protocol numbers or parport I/O +addresses are used. + +All parports and all protocol drivers are probed automatically unless probe=0 +parameter is used. So just "modprobe epat" is enough for a Imation SuperDisk +drive to work. + +Manual device creation:: + + # echo "port protocol mode unit delay" >/sys/bus/pata_parport/new_device + +where: + + ======== ================================================ + port parport name (or "auto" for all parports) + protocol protocol name (or "auto" for all protocols) + mode mode number (protocol-specific) or -1 for probe + unit unit number (see the paride documentation above) + delay I/O delay (see the paride documentation above) + ======== ================================================ + +If you omit the parameters from the end, defaults will be used, e.g.: + +Probe all parports with all protocols:: + + # echo auto >/sys/bus/pata_parport/new_device + +Probe parport0 using protocol epat and mode 4 (EPP-16):: + + # echo "parport0 epat 4" >/sys/bus/pata_parport/new_device + +Probe parport0 using all protocols:: + + # echo "parport0 auto" >/sys/bus/pata_parport/new_device + +Probe all parports using protoocol epat:: + + # echo "auto epat" >/sys/bus/pata_parport/new_device + +Deleting devices:: + + # echo pata_parport.0 >/sys/bus/pata_parport/delete_device |