linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pata_isapnp: Don't use invalid I/O ports
@ 2013-09-12 21:01 Ondrej Zary
  2013-09-13 18:54 ` Ondrej Zary
  2013-09-22 21:42 ` Tejun Heo
  0 siblings, 2 replies; 9+ messages in thread
From: Ondrej Zary @ 2013-09-12 21:01 UTC (permalink / raw)
  To: linux-ide; +Cc: linux-kernel

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>
---
 drivers/ata/pata_isapnp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index 4bceb88..b33d1f9 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -78,7 +78,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
 
 	ap->ioaddr.cmd_addr = cmd_addr;
 
-	if (pnp_port_valid(idev, 1) == 0) {
+	if (pnp_port_valid(idev, 1)) {
 		ctl_addr = devm_ioport_map(&idev->dev,
 					   pnp_port_start(idev, 1), 1);
 		ap->ioaddr.altstatus_addr = ctl_addr;
-- 
Ondrej Zary

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-23 17:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-12 21:01 [PATCH] pata_isapnp: Don't use invalid I/O ports Ondrej Zary
2013-09-13 18:54 ` Ondrej Zary
2013-09-13 21:44   ` Ondrej Zary
2013-09-22 16:49     ` Tejun Heo
2013-09-22 19:33       ` Ondrej Zary
2013-09-22 21:42 ` Tejun Heo
2013-09-23 12:51   ` Sergei Shtylyov
2013-09-23 13:00     ` Tejun Heo
2013-09-23 17:12       ` Ondrej Zary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).