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>, Jeff Garzik <jeff@garzik.org>,
	linux-ide@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH libata-dev#upstream-fixes] libata: fix drive side 80c cable check, take 3
Date: Thu, 12 Jul 2007 22:50:20 +0400	[thread overview]
Message-ID: <469677EC.703@ru.mvista.com> (raw)
In-Reply-To: <4696758F.7040403@ru.mvista.com>

Hello, I wrote:

>> The 80c wire bit is bit 13, not 14.  Bit 14 is always 1 if word93 is
>> implemented.  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 the test
>> and add word93 validity check.

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

>> diff --git a/include/linux/ata.h b/include/linux/ata.h
>> index 1df9416..939be94 100644
>> --- a/include/linux/ata.h
>> +++ b/include/linux/ata.h
>> @@ -347,7 +347,7 @@ static inline int ata_drive_40wire(const u16 *dev_id)
>>  {
>>      if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id))
>>          return 0;    /* SATA */
>> -    if (dev_id[93] & 0x4000)
>> +    if ((dev_id[93] & 0xE000) == 0x6000)
>>          return 0;    /* 80 wire */
>>      return 1;
>>  }

>    Wrong, wrong as well! The correct value to compare with would be 0x4000.

    Sorry for the false alarm -- those opposite senses on CBLID- have really 
confused me. :-<

MBR, Sergei

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05  7:45 [PATCH libata-dev#upstream-fixes] libata: fix drive side 80c cable check Tejun Heo
2007-02-05 10:57 ` Alan
2007-02-05 12:41   ` [PATCH libata-dev#upstream-fixes] libata: fix drive side 80c cable check, take 2 Tejun Heo
2007-02-05 13:27     ` Alan
2007-02-05 14:21       ` [PATCH libata-dev#upstream-fixes] libata: fix drive side 80c cable check, take 3 Tejun Heo
2007-02-05 14:36         ` Alan
2007-02-15 23:08         ` Jeff Garzik
2007-07-12 18:40         ` Sergei Shtylyov
2007-07-12 18:50           ` Sergei Shtylyov [this message]
2007-07-13  4:12             ` Tejun Heo

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=469677EC.703@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --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).