mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Athol Mullen <athol_SPIT_SPAM@idl.net.au>
To: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] IDE 80-core cable detect - chipset-specific code to over-ride eighty_ninty_three()
Date: Tue, 10 Feb 2004 18:16:28 +1100	[thread overview]
Message-ID: <200402101816.28067.athol_SPIT_SPAM@idl.net.au> (raw)
In-Reply-To: <1nu6y-XO-3@gated-at.bofh.it>

Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> wrote:
> On Monday 09 of February 2004 03:50, Athol Mullen wrote:
(Don't CC.  I read lkml via linux.kernel newsgroup.)

>> +     u16 cr_flag             = 0x10 << drive->dn;

>> +                         pci_read_config_word(dev, 0x54, &reg54);
>> +                         return ((reg54 & cr_flag) ? 1 : 0);

> This is plain wrong, piix.c already does it for you.
> piix.c:init_hwif_piix():

The penny drops...

I missed this code because I was looking for cable detection on
a drive-by-drive basis, and this is taking drives in pairs.

That's why the drive was being correctly initialised as a UDMA5
drive even though eighty_ninty_three() was returning zero.

The existing code was written before the ICH5 came out, and will
always work for ICH4 and older, but is wrong in its method of
detecting 80-core cables on an ICH5, and could fail if SATA and
PATA drives are mixed and used in compatability mode.  The bit
flags should be taken on a drive-by-drive basis, because the ICH5
is capable of logical mapping such as:

SATA0 -> IDE0 Master
SATA1 -> IDE0 Slave
PATA0 master -> IDE1 Master
PATA1 master -> IDE1 Slave

Note that this now sees two PATA drives on different physical
interfaces looking like master and slave on one interface.  In this
scenario, if PATA1 has a 40-core and PATA0 an 80-core or vise versa,
both would be detected as having 80-core with the existing code.

Why do I feel like I just pulled the lid off a can of worms?

The options are essentially that we:
1. Always force the SATA interfaces into native mode and PATA
   into native or normal mode (desirable - the compatability mode
   described above make only 2 PATA drives visible),
2. Modify the above code to work on a drive-by-drive basis instead
   of interface-by-interface (according to Intel, this is the
   correct answer),
3. Do nothing, and hope nobody notices.  :-)

> Please make sure you have CONFIG_IDEDMA_IVB=n in your config.
> If it is okay, please send me a copy of /proc/ide/hdX/identify.

I definately had CONFIG_IDEDMA_IVB=n.

/proc/ide/hda/identify and /proc/ide/hda/model emailed.

(Apologies if messages don't thread properly.)

-- 
Athol
<http://cust.idl.com.au/athol>
Linux Registered User # 254000
I'm a Libran Engineer. I don't argue, I discuss.



       reply	other threads:[~2004-02-10  7:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1n9OA-6lu-17@gated-at.bofh.it>
     [not found] ` <1n9OA-6lu-23@gated-at.bofh.it>
     [not found]   ` <1n9OA-6lu-15@gated-at.bofh.it>
     [not found]     ` <1nu6y-XO-3@gated-at.bofh.it>
2004-02-10  7:16       ` Athol Mullen [this message]
2004-02-10 14:41         ` Bartlomiej Zolnierkiewicz
     [not found] <1mLsS-6Oq-7@gated-at.bofh.it>
     [not found] ` <1mLsS-6Oq-9@gated-at.bofh.it>
     [not found]   ` <1mLsS-6Oq-5@gated-at.bofh.it>
     [not found]     ` <1mRHV-4Xn-7@gated-at.bofh.it>
2004-02-09  2:50       ` Athol Mullen
2004-02-09 20:04         ` Willy Tarreau
2004-02-10  0:24         ` Bartlomiej Zolnierkiewicz
     [not found] <1mtPj-7oQ-3@gated-at.bofh.it>
     [not found] ` <1mwNn-1xb-27@gated-at.bofh.it>
2004-02-08  0:45   ` Athol Mullen
2004-02-08  7:31     ` Willy Tarreau
2004-02-10  0:10       ` Bartlomiej Zolnierkiewicz
2004-02-10  0:37         ` Bartlomiej Zolnierkiewicz
2004-02-07  6:00 Athol Mullen
2004-02-07  9:15 ` Willy Tarreau

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=200402101816.28067.athol_SPIT_SPAM@idl.net.au \
    --to=athol_spit_spam@idl.net.au \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®