linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: linux-ide@vger.kernel.org
Cc: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, htejun@gmail.com
Subject: [RFC] libata IORDY handling
Date: Sun, 28 Jan 2007 21:22:59 +0300	[thread overview]
Message-ID: <45BCEA03.8070901@ru.mvista.com> (raw)
In-Reply-To: <200701282024.17518.sshtylyov@ru.mvista.com>

Hello.

Sergei Shtylyov wrote:

> Fix PIO mode 1 overclocked taskfile transfers -- probably a typo carried over
> from drivers/ide/pci/siimage.c where I've found it by documentation check...

>  drivers/ata/pata_sil680.c |    2 +-
>  1 files changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/ata/pata_sil680.c
> ===================================================================
> --- linux-2.6.orig/drivers/ata/pata_sil680.c
> +++ linux-2.6/drivers/ata/pata_sil680.c
> @@ -135,7 +135,7 @@ static void sil680_error_handler(struct 
>  static void sil680_set_piomode(struct ata_port *ap, struct ata_device *adev)

    It's sad to say but there's another bug in this function (even a 
regression from drivers/ide/pci/siimage.c) -- the 16-bit IORDY is not enabled 
when setting PIO mode (there's code that twiddles IORDY enable but that's 
actually only for *taskfile* accesses, 16-bit IORDY is controlled by the same 
PCI  config. registers 80h/84h that enable DMA/UDMA transfer on SiI 680).
    I looked into fixing this but had a feeling that the thing wasn't right 
from the very start, including ata_pio_need_iordy().  In my understanding of 
the ANSI T13 stadrads, when one issues Set Features subcommand Set Transfer 
Mode with sector count register of 0x8 thru 0xC this means that IORDY *must* 
be enabled. That's what the ATA/ATAPI-6 says, for example:

         Table 45 - Transfer mode values
Mode                             Bits (7:3) Bits (2:0)
PIO default mode                 00000b     000b
PIO default mode, disable IORDY  00000b     001b
PIO *flow control* transfer mode 00001b     mode

    Comments?

MBR, Sergei

  reply	other threads:[~2007-01-28 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28 17:24 [PATCH] pata_sil680: PIO1 taskfile transfers oveclocking fix Sergei Shtylyov
2007-01-28 18:22 ` Sergei Shtylyov [this message]
2007-01-28 19:03   ` [RFC] libata IORDY handling Alan
2007-01-28 19:00     ` Sergei Shtylyov
2007-01-29 13:34   ` Alan
2007-01-29 14:28     ` Sergei Shtylyov
2007-01-29 15:45       ` Alan
2007-01-28 18:41 ` [PATCH] pata_sil680: PIO1 taskfile transfers oveclocking fix Alan

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=45BCEA03.8070901@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --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 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).