From: Alan <alan@lxorguk.ukuu.org.uk>
To: Tejun Heo <htejun@gmail.com>,
bzolnier@gmail.com, stable@kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ide: fix drive side 80c cable check
Date: Mon, 5 Feb 2007 11:18:37 +0000 [thread overview]
Message-ID: <20070205111837.1981bda2@localhost.localdomain> (raw)
In-Reply-To: <20070205074713.GF1625@htj.dyndns.org>
On Mon, 5 Feb 2007 16:47:13 +0900
Tejun Heo <htejun@gmail.com> wrote:
> The 80c wire bit is bit 13, not 14. 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>
> ---
> Please consider for -stable.
>
> drivers/ide/ide-iops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: work/drivers/ide/ide-iops.c
> ===================================================================
> --- work.orig/drivers/ide/ide-iops.c
> +++ work/drivers/ide/ide-iops.c
> @@ -604,7 +604,7 @@ u8 eighty_ninty_three (ide_drive_t *driv
> if (!(drive->id->hw_config & 0x6000))
> return 0;
> #ifndef CONFIG_IDEDMA_IVB
> - if(!(drive->id->hw_config & 0x4000))
> + if (!(drive->id->hw_config & 0x2000))
> return 0;
> #endif /* CONFIG_IDEDMA_IVB */
NAK
While the old code is a mess, your changes don't fix it. The code above
is correct before you touch it as far as I can tell. Incomplete but
correct as far as it went.
The logic in the function as far as it goes is correct
If neither valid bit nor 80pin bit set -> 40pin [00]
If checking valid bit && valid bit clear -> 40pin [0x]
The 0x2000 test is needed as an additional test (as per the
ide_ata66_check function directly below) [10] v [11]
Without this an id value of 0x2000 will trigger 80pin but is not valid.
(the IDEDMA_IVB check is more relaxted to handle some confused ATA4
drives, and is probably something we don't want in libata anyway, or
should blacklist the afflicted for this)
Alan
next prev parent reply other threads:[~2007-02-05 11:06 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 [this message]
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
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=20070205111837.1981bda2@localhost.localdomain \
--to=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).