From: Ondrej Zary <linux@rainbow-software.org>
To: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pata_isapnp: Don't use invalid I/O ports
Date: Fri, 13 Sep 2013 20:54:37 +0200 [thread overview]
Message-ID: <201309132054.38278.linux@rainbow-software.org> (raw)
In-Reply-To: <1379019689-21467-1-git-send-email-linux@rainbow-software.org>
On Thursday 12 September 2013 23:01:29 Ondrej Zary wrote:
> 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;
With this patch, the ATA port works fine if there is a device connected to it.
However, it takes ages to boot if there are no devices connected. Looks like
the driver retries IDENTIFY command for both slave and master drives in a
hope that the devices are there.
log:
[ 7.692344] pata_isapnp 01:01.02: [io 0x01e8-0x01ef]
[ 7.692474] pata_isapnp 01:01.02: [io 0x0168-0x016f]
[ 7.692644] pata_isapnp 01:01.02: [irq 10]
[ 7.695012] pata_isapnp 01:01.02: activated
[ 7.751153] scsi2 : pata_isapnp
[ 7.751781] ata3: PATA max PIO0 cmd 0x168 ctl 0x0 irq 10
[ 12.751446] ata3.01: qc timeout (cmd 0xec)
[ 12.751571] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
[ 22.752270] ata3.01: qc timeout (cmd 0xec)
[ 22.752396] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
[ 52.754737] ata3.01: qc timeout (cmd 0xec)
[ 52.754861] ata3.01: failed to IDENTIFY (I/O error, err_mask=0x5)
[ 57.755149] ata3.00: qc timeout (cmd 0xec)
[ 57.755275] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x5)
[ 67.755974] ata3.00: qc timeout (cmd 0xec)
[ 67.756099] ata3.00: failed to IDENTIFY (I/O error, err_mask=0x5)
--
Ondrej Zary
next prev parent reply other threads:[~2013-09-13 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-12 21:01 [PATCH] pata_isapnp: Don't use invalid I/O ports Ondrej Zary
2013-09-13 18:54 ` Ondrej Zary [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201309132054.38278.linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).