linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Alan <alan@lxorguk.ukuu.org.uk>,
	bzolnier@gmail.com, stable@kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ide: fix drive side 80c cable check, take 2
Date: Thu, 12 Jul 2007 22:34:16 +0400	[thread overview]
Message-ID: <46967428.5090402@ru.mvista.com> (raw)
In-Reply-To: <20070205124713.GL1625@htj.dyndns.org>

Hello.

Tejun Heo wrote:

> eighty_ninty_three() had word 93 validitity check but not the 80c bit
> test itself (bit 12).  This increases the chance of incorrect wire
> detection especially because host side cable detection is often
> unreliable and we sometimes soley depend on drive side cable
> detection.  Fix it.

> Signed-off-by: Tejun Heo <htejun@gmail.com>

> diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
> index badde63..6558055 100644
> --- a/drivers/ide/ide-iops.c
> +++ b/drivers/ide/ide-iops.c
> @@ -607,6 +607,8 @@ u8 eighty_ninty_three (ide_drive_t *drive)
>  	if(!(drive->id->hw_config & 0x4000))
>  		return 0;
>  #endif /* CONFIG_IDEDMA_IVB */
> +	if (!(drive->id->hw_config & 0x2000))
> +		return 0;

    Haha, you know just *why* this was wrong? Bit 13 of the word 93 when *set* 
means 40c cable, not 80c!  Look at the table 9 in ATA/PI-6, for example, and 
then into the bit description in the table 27.

>  	return 1;
>  }

MBR, Sergei

  parent reply	other threads:[~2007-07-12 18:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05  7:47 [PATCH] ide: fix drive side 80c cable check Tejun Heo
2007-02-05 11:18 ` Alan
2007-02-05 12:47   ` [PATCH] ide: fix drive side 80c cable check, take 2 Tejun Heo
2007-02-05 13:28     ` Alan
     [not found]       ` <58cb370e0702061454j1dfe2492w240ca06c028043b7@mail.gmail.com>
2007-02-06 23:09         ` Bartlomiej Zolnierkiewicz
2007-07-12 18:34     ` Sergei Shtylyov [this message]
2007-07-12 18:45       ` 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=46967428.5090402@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=stable@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).