From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-core: Drop in the final bit of IORDY handling
Date: Mon, 15 Oct 2007 23:42:41 +0400 [thread overview]
Message-ID: <4713C2B1.7090701@ru.mvista.com> (raw)
In-Reply-To: <20071015192040.5a11bcf7@the-village.bc.nu>
Hello.
Alan Cox wrote:
> Signed-off-by: Alan Cox <alan@redhat.com>
> diff -u --exclude-from /usr/src/exclude --new-file --recursive linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c linux-2.6.23-mm1/drivers/ata/libata-core.c
> --- linux.vanilla-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:03:26.000000000 +0100
> +++ linux-2.6.23-mm1/drivers/ata/libata-core.c 2007-10-15 15:13:49.000000000 +0100
> @@ -4203,8 +4219,12 @@
> tf.command = ATA_CMD_SET_FEATURES;
> tf.feature = SETFEATURES_XFER;
> tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_POLLING;
> tf.protocol = ATA_PROT_NODATA;
> - tf.nsect = dev->xfer_mode;
> + /* Ancient devices may need us to avoid IORDY */
> + if (ata_pio_need_iordy(dev))
> + tf.nsect = dev->xfer_mode;
> + else
> + tf.nsect = 0x01;
This is wrong logic as I've alredy pointed out: according to the ATA-2
setting *any* PIO mode via 0x08..0x0c commands assumes IORDY is enabled.
We should only set mode 0x01 (default w/IORDY disabled) if device supports
IORDY and the host doesn't.
> err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
MBR, Sergei
next prev parent reply other threads:[~2007-10-15 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 18:20 [PATCH] libata-core: Drop in the final bit of IORDY handling Alan Cox
2007-10-15 19:42 ` Sergei Shtylyov [this message]
2007-10-15 20:25 ` Alan Cox
2007-10-15 20:32 ` Sergei Shtylyov
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=4713C2B1.7090701@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.