diff options
author | Matwey V. Kornilov <matwey@sai.msu.ru> | 2014-08-27 04:07:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-24 02:14:28 -0400 |
commit | 0ae39cc98192252f756f8943be85e9f4dbd8436e (patch) | |
tree | e5bb7427279fb82886d7a0e7a4da43a7b9dd7bf9 /drivers/parport | |
parent | 17891c8a9ea17a11b437c7184f7f04e0ab7be811 (diff) |
parport: parport_pc: Implement architecture and device check to cut off false-positives
We definitely know that only x86 (32-bit) architecture is affected by the issue, so implement a stub instead of the actual check for other architectures.
We also know that motherboard LPT chipset is affected, so the port is either come from
parport_pc_init (when `io' module param is used) or
parport_pc_find_isa_ports (when default LPT ports are probbed: 0x378, 0x278, 0x3bc).
In both cases the port considered as 'legacy' and `dev' member of struct parport is NULL. See also comments for `struct parport' in parport.h
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/parport_pc.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index fedc06bed18d..f721299eb1ba 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c | |||
@@ -1702,7 +1702,8 @@ static int parport_ECP_supported(struct parport *pb) | |||
1702 | } | 1702 | } |
1703 | #endif | 1703 | #endif |
1704 | 1704 | ||
1705 | static int intel_bug_present(struct parport *pb) | 1705 | #ifdef CONFIG_X86_32 |
1706 | static int intel_bug_present_check_epp(struct parport *pb) | ||
1706 | { | 1707 | { |
1707 | const struct parport_pc_private *priv = pb->private_data; | 1708 | const struct parport_pc_private *priv = pb->private_data; |
1708 | int bug_present = 0; | 1709 | int bug_present = 0; |
@@ -1725,6 +1726,21 @@ static int intel_bug_present(struct parport *pb) | |||
1725 | 1726 | ||
1726 | return bug_present; | 1727 | return bug_present; |
1727 | } | 1728 | } |
1729 | static int intel_bug_present(struct parport *pb) | ||
1730 | { | ||
1731 | /* Check whether the device is legacy, not PCI or PCMCIA. Only legacy is known to be affected. */ | ||
1732 | if (pb->dev != NULL) { | ||
1733 | return 0; | ||
1734 | } | ||
1735 | |||
1736 | return intel_bug_present_check_epp(pb); | ||
1737 | } | ||
1738 | #else | ||
1739 | static int intel_bug_present(struct parport *pb) | ||
1740 | { | ||
1741 | return 0; | ||
1742 | } | ||
1743 | #endif /* CONFIG_X86_32 */ | ||
1728 | 1744 | ||
1729 | static int parport_ECPPS2_supported(struct parport *pb) | 1745 | static int parport_ECPPS2_supported(struct parport *pb) |
1730 | { | 1746 | { |