linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Mario Schwalbe <schwalbe@inf.tu-dresden.de>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org,
	Linux IDE mailing list <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I/O support properly
Date: Thu, 18 Dec 2008 20:24:56 +0300	[thread overview]
Message-ID: <494A8768.4080100@ru.mvista.com> (raw)
In-Reply-To: <494A837A.50801@garzik.org>

Hello.

Jeff Garzik wrote:

>> This patch fixes ata_id_has_dword_io to return 1 (supported) if
>> the drive is compliant to ATA2 or newer and evaluates the config
>> word for older drives.

>> Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>

>> diff --git a/include/linux/ata.h b/include/linux/ata.h
>> index a53318b..d0d6a9c 100644
>> --- a/include/linux/ata.h
>> +++ b/include/linux/ata.h
>> @@ -700,12 +700,12 @@ static inline int ata_id_has_tpm(const u16 *id)

>>  static inline int ata_id_has_dword_io(const u16 *id)
>>  {
>> -    /* ATA 8 reuses this flag for "trusted" computing */
>> -    if (ata_id_major_version(id) > 7)
>> -        return 0;
>> -    if (id[ATA_ID_DWORD_IO] & (1 << 0))
>> -        return 1;
>> -    return 0;
>> +    /* This flag is defined up to ATA1 and deprecated since then
>> +       (ATA 8 reuses this flag for "trusted" computing). */
>> +    if (ata_id_major_version(id) <= 1)
>> +        return (id[ATA_ID_DWORD_IO] & (1 << 0)) != 0;
>> +    /* later revision drives support DWORD I/O just fine */
>> +    return 1;

> This seems like a risky assumption...

    Not at all, I think. It's total mystery how "DWORD I/O" could've been even 
(not) supported by a *drive* at all. Support of "DWORD I/O" is a property of 
the PATA controller. Frankly speaking, I don't think that this function is at 
all useful...

>     Jeff

MBR, Sergei

  reply	other threads:[~2008-12-18 17:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <494A5BBF.8000807@inf.tu-dresden.de>
2008-12-18 17:08 ` [PATCH] ide: Fix ata_id_has_dword_io to return DWORD I/O support properly Jeff Garzik
2008-12-18 17:24   ` Sergei Shtylyov [this message]
2008-12-18 20:42     ` Bartlomiej Zolnierkiewicz
2008-12-18 22:40       ` Alan Cox
2008-12-18 23:13         ` Bartlomiej Zolnierkiewicz
2008-12-19 10:50           ` Alan Cox
2008-12-19 19:30             ` Bartlomiej Zolnierkiewicz
2008-12-20  0:10               ` Alan Cox
2008-12-19 11:31         ` Sergei Shtylyov
2008-12-19 11:34           ` Sergei Shtylyov
2008-12-18 18:10   ` Alan Cox
2008-12-20  1:58     ` Robert Hancock
2008-12-20 13:25       ` Sergei Shtylyov
2008-12-22 20:16         ` 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=494A8768.4080100@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwalbe@inf.tu-dresden.de \
    /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).