All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/3] ide: don't enable IORDY at a probe time
Date: Sun, 14 Jun 2009 00:58:44 +0400	[thread overview]
Message-ID: <4A341304.4040304@ru.mvista.com> (raw)
In-Reply-To: <200906131823.15906.bzolnier@gmail.com>

Bartlomiej Zolnierkiewicz wrote:

> * Add 'unsigned long port_flags' field to ide_hwif_t.
>
> * Add IDE_PFLAG_PROBING port flag and keep it set during probing.
>
> * Fix ide_pio_need_iordy() to not enable IORDY at a probe time
>   (IORDY may lead to controller lock up on certain controllers
>    if the port is not occupied).
>
> Loosely based on the recent libata's fix by Tejun, thanks to Alan
> for the hint that IDE may also need it.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
[...]

> Index: b/drivers/ide/ide-xfer-mode.c
> ===================================================================
> --- a/drivers/ide/ide-xfer-mode.c
> +++ b/drivers/ide/ide-xfer-mode.c
> @@ -109,6 +109,12 @@ EXPORT_SYMBOL_GPL(ide_get_best_pio_mode)
>  
>  int ide_pio_need_iordy(ide_drive_t *drive, const u8 pio)
>  {
> +	/*
> +	 * IORDY may lead to controller lock up on certain controllers
> +	 * if the port is not occupied.
>   

   This is really strange -- shouldn't it be floating in this case, and 
so most sampled as 1? Who can pull it down on an empty port?..

> +	 */
> +	if (pio == 0 && (drive->hwif->port_flags & IDE_PFLAG_PROBING))
> +		return 0;
>   

   Now I'm seeing why there was a need to introduce the wrapper. :-)

MBR, Sergei



      reply	other threads:[~2009-06-13 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-13 16:23 [PATCH 3/3] ide: don't enable IORDY at a probe time Bartlomiej Zolnierkiewicz
2009-06-13 20:58 ` Sergei Shtylyov [this message]

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=4A341304.4040304@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.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 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.