提交 0ae39cc9 编写于 作者: M Matwey V. Kornilov 提交者: Greg Kroah-Hartman

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: NMatwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 17891c8a
......@@ -1702,7 +1702,8 @@ static int parport_ECP_supported(struct parport *pb)
}
#endif
static int intel_bug_present(struct parport *pb)
#ifdef CONFIG_X86_32
static int intel_bug_present_check_epp(struct parport *pb)
{
const struct parport_pc_private *priv = pb->private_data;
int bug_present = 0;
......@@ -1725,6 +1726,21 @@ static int intel_bug_present(struct parport *pb)
return bug_present;
}
static int intel_bug_present(struct parport *pb)
{
/* Check whether the device is legacy, not PCI or PCMCIA. Only legacy is known to be affected. */
if (pb->dev != NULL) {
return 0;
}
return intel_bug_present_check_epp(pb);
}
#else
static int intel_bug_present(struct parport *pb)
{
return 0;
}
#endif /* CONFIG_X86_32 */
static int parport_ECPPS2_supported(struct parport *pb)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册