diff options
author | Maciej W. Rozycki <macro@orcam.me.uk> | 2023-01-08 21:56:52 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-20 13:12:00 +0100 |
commit | 6640727fc55b7f0b561e927bc9c5b9d4c459fd8e (patch) | |
tree | 963db3fe3b386c4d35e5ddf573c15e7426ea1f33 /include/linux/parport_pc.h | |
parent | f01dda1cb85e14a1d51c3cedad0feaaf71a93b4b (diff) | |
download | linux-stable-6640727fc55b7f0b561e927bc9c5b9d4c459fd8e.tar.gz linux-stable-6640727fc55b7f0b561e927bc9c5b9d4c459fd8e.tar.bz2 linux-stable-6640727fc55b7f0b561e927bc9c5b9d4c459fd8e.zip |
parport_pc: Let chipset drivers mask ECR bits on writes
Provide an `ecr_writable' parameter to `__parport_pc_probe_port' so that
callers can specify a mask of bits to modify on ECR writes.
To avoid the need for separate bit set and bit clear masks always set
bit 0 whenever a non-zero mask has been set, as all the currently known
cases where a mask is required, that is Oxford Semiconductor devices, do
require this bit to be set. If further cases are discovered where the
bit is required to be clear, we can update code accordingly, but chances
are very low as the bit is supposed to be read-only[1].
Skip ECR probing, which can be problematic as the Oxford Semiconductor
OX12PCI840 part has been reported to lock up on setting bit 2, whenever
a non-zero mask has been requested by a port subdriver, assuming that
the ECR must be there if the subdriver has requested a specific way to
access it.
References:
[1] "Extended Capabilities Port Protocol and ISA Interface Standard",
Microsoft Corporation, Revision: 1.14, July 14, 1993, Table 14
"Extended Control Register"
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20230108215656.6433-3-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/parport_pc.h')
-rw-r--r-- | include/linux/parport_pc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/parport_pc.h b/include/linux/parport_pc.h index 3d6fc576d6a1..f1ec5c10c3b3 100644 --- a/include/linux/parport_pc.h +++ b/include/linux/parport_pc.h @@ -26,6 +26,9 @@ struct parport_pc_private { /* Whether or not there's an ECR. */ int ecr; + /* Bitmask of writable ECR bits. */ + unsigned char ecr_writable; + /* Number of PWords that FIFO will hold. */ int fifo_depth; |