Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pata_isapnp: Don't use invalid I/O ports

The test for 2nd I/O port validity is broken (reversed): On devices
with no control port, the driver attempts to use invalid port 0,
resulting in logs full of bad_io_access errors. On devices with
control port, the driver does not use it.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Ondrej Zary and committed by
Tejun Heo
fc0012ec 272b98c6

+1 -1
+1 -1
drivers/ata/pata_isapnp.c
··· 78 78 79 79 ap->ioaddr.cmd_addr = cmd_addr; 80 80 81 - if (pnp_port_valid(idev, 1) == 0) { 81 + if (pnp_port_valid(idev, 1)) { 82 82 ctl_addr = devm_ioport_map(&idev->dev, 83 83 pnp_port_start(idev, 1), 1); 84 84 ap->ioaddr.altstatus_addr = ctl_addr;