summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorOndrej Zary <linux@zary.sk>2023-01-23 20:09:54 +0100
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-01-31 09:34:41 +0900
commit246a1c4c6b7ffba88a2553d2b88f7b6280f253a2 (patch)
tree51572de71bfb670a0eb07277178a4da6fcb738e3 /drivers/block
parent38d431229bfbe175b41274faa856e5b0a1ebe70d (diff)
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 'drivers/block')
-rw-r--r--drivers/block/paride/Kconfig32
-rw-r--r--drivers/block/paride/paride.h13
2 files changed, 29 insertions, 16 deletions
diff --git a/drivers/block/paride/Kconfig b/drivers/block/paride/Kconfig
index a295634597ba..01e4ef3655c1 100644
--- a/drivers/block/paride/Kconfig
+++ b/drivers/block/paride/Kconfig
@@ -92,11 +92,11 @@ config PARIDE_PG
later fully support this driver.
comment "Parallel IDE protocol modules"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
config PARIDE_ATEN
tristate "ATEN EH-100 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the ATEN EH-100 parallel port IDE
protocol. This protocol is used in some inexpensive low performance
@@ -109,7 +109,7 @@ config PARIDE_ATEN
config PARIDE_BPCK
tristate "MicroSolutions backpack (Series 5) protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the Micro Solutions BACKPACK
parallel port Series 5 IDE protocol. (Most BACKPACK drives made
@@ -127,7 +127,7 @@ config PARIDE_BPCK
config PARIDE_BPCK6
tristate "MicroSolutions backpack (Series 6) protocol"
- depends on PARIDE && !64BIT
+ depends on (PARIDE || PATA_PARPORT) && !64BIT
help
This option enables support for the Micro Solutions BACKPACK
parallel port Series 6 IDE protocol. (Most BACKPACK drives made
@@ -146,7 +146,7 @@ config PARIDE_BPCK6
config PARIDE_COMM
tristate "DataStor Commuter protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the Commuter parallel port IDE
protocol from DataStor. If you chose to build PARIDE support
@@ -157,7 +157,7 @@ config PARIDE_COMM
config PARIDE_DSTR
tristate "DataStor EP-2000 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the EP-2000 parallel port IDE
protocol from DataStor. If you chose to build PARIDE support
@@ -168,7 +168,7 @@ config PARIDE_DSTR
config PARIDE_FIT2
tristate "FIT TD-2000 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the TD-2000 parallel port IDE
protocol from Fidelity International Technology. This is a simple
@@ -181,7 +181,7 @@ config PARIDE_FIT2
config PARIDE_FIT3
tristate "FIT TD-3000 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the TD-3000 parallel port IDE
protocol from Fidelity International Technology. This protocol is
@@ -194,7 +194,7 @@ config PARIDE_FIT3
config PARIDE_EPAT
tristate "Shuttle EPAT/EPEZ protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the EPAT parallel port IDE protocol.
EPAT is a parallel port IDE adapter manufactured by Shuttle
@@ -216,7 +216,7 @@ config PARIDE_EPATC8
config PARIDE_EPIA
tristate "Shuttle EPIA protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the (obsolete) EPIA parallel port
IDE protocol from Shuttle Technology. This adapter can still be
@@ -228,7 +228,7 @@ config PARIDE_EPIA
config PARIDE_FRIQ
tristate "Freecom IQ ASIC-2 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for version 2 of the Freecom IQ parallel
port IDE adapter. This adapter is used by the Maxell Superdisk
@@ -240,7 +240,7 @@ config PARIDE_FRIQ
config PARIDE_FRPW
tristate "FreeCom power protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the Freecom power parallel port IDE
protocol. If you chose to build PARIDE support into your kernel, you
@@ -251,7 +251,7 @@ config PARIDE_FRPW
config PARIDE_KBIC
tristate "KingByte KBIC-951A/971A protocols"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the KBIC-951A and KBIC-971A parallel
port IDE protocols from KingByte Information Corp. KingByte's
@@ -264,7 +264,7 @@ config PARIDE_KBIC
config PARIDE_KTTI
tristate "KT PHd protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the "PHd" parallel port IDE protocol
from KT Technology. This is a simple (low speed) adapter that is
@@ -277,7 +277,7 @@ config PARIDE_KTTI
config PARIDE_ON20
tristate "OnSpec 90c20 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the (obsolete) 90c20 parallel port
IDE protocol from OnSpec (often marketed under the ValuStore brand
@@ -289,7 +289,7 @@ config PARIDE_ON20
config PARIDE_ON26
tristate "OnSpec 90c26 protocol"
- depends on PARIDE
+ depends on PARIDE || PATA_PARPORT
help
This option enables support for the 90c26 parallel port IDE protocol
from OnSpec Electronics (often marketed under the ValuStore brand
diff --git a/drivers/block/paride/paride.h b/drivers/block/paride/paride.h
index ddb9e589da7f..24dcfadb782d 100644
--- a/drivers/block/paride/paride.h
+++ b/drivers/block/paride/paride.h
@@ -1,3 +1,15 @@
+/*
+ * The low-level protocol modules are used by either paride or pata_parport.
+ * These two are mutually exclusive because the compiled low-level protocol
+ * modules are not compatible.
+ * When PATA_PARPORT is enabled, include pata_parport.h instead of the rest
+ * of this file.
+ */
+
+#if IS_ENABLED(CONFIG_PATA_PARPORT)
+#include <linux/pata_parport.h>
+
+#else
#ifndef __DRIVERS_PARIDE_H__
#define __DRIVERS_PARIDE_H__
@@ -170,3 +182,4 @@ void pi_unregister_driver(void *);
#endif /* __DRIVERS_PARIDE_H__ */
/* end of paride.h */
+#endif /* IS_ENABLED(CONFIG_PATA_PARPORT) */