All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org, Tejun Heo <htejun@gmail.com>
Subject: Re: [PATCH][pata] ide: cable detection fixes
Date: Mon, 12 Feb 2007 01:37:57 +0100	[thread overview]
Message-ID: <200702120137.57898.bzolnier@gmail.com> (raw)
In-Reply-To: <20070211230840.06c1f38b@localhost.localdomain>


On Monday 12 February 2007 00:08, Alan wrote:
> > * use eighty_ninty_three() in ide_ata66_check(), this actually fixes 3 bugs:
> >   - bit 13 (word 93 validity check) == 1 and bit 12 (80-wire cable test) == 0
> >     configuration was incorrectly treated as a 80-wire cable present
> 
> I think you mean bit 14 and bit 13. And for validity you must check bits

Yes, thanks for catching this, fixed now.

[ "fix drive side 80c cable check" patch description also needed fixing ]

> 14/15 together as 0x01. Code seems to have the bits right not the
> comment, but doesn't check bit 15.
> 
> You also change the IVB behaviour from assuming drives would set either
> the correct bit and/or the valid bit, to drives must always set the
> correct bit but not neccessarily valid. It would be nice to know if that
> is intentional as the original IVB hack is murky early ATA standard

For ide_ata66_check() IVB=y/n cases were interchanged when compared to
eighty_ninty_three():

* for IVB=n (the default setting) the old code required bit 14 or bit 13
  to be set which is what eighty_ninty_three() required for IVB=y before
  Tejun's patch

* for IVB=y (IVB hack on) the old code required both bits 14 and 13 to be set,
  which is what eighty_ninty_three() requires for IVB=n after Tejun's patch
  (before Tejun's patch only bit 14 was required to be set)

The old code just couldn't work for IVB, this probably has gone unnoticed
for years because ide_ata66_check() is only used for user space originated
transfer mode change requests.

> history and I am not sure what the drive id error in question actually
> was ?

I can't be sure what was the original intent of IVB hack but I have seen
a few cases when IVB hack was needed for Quantum disks which had only bit 13
set and bits 15/14 cleared.

[ it is also worth to note here that ATA4 doesn't define word 93 and
  that the pre-ATA5 proposal for the cable detection came from Quantum ]

Bart

      reply	other threads:[~2007-02-12  0:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 22:24 [PATCH][pata] ide: cable detection fixes Bartlomiej Zolnierkiewicz
2007-02-11 23:08 ` Alan
2007-02-12  0:37   ` Bartlomiej Zolnierkiewicz [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=200702120137.57898.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@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.