From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: akpm@osdl.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: PATCH: Old IDE, fix SATA detection for cabling
Date: Mon, 26 Jun 2006 14:42:59 +0100 [thread overview]
Message-ID: <1151329380.27147.19.camel@localhost.localdomain> (raw)
This is based on the proposed patches flying around but also checks that
the device in question is new enough to have word 93 rather thanb
blindly assuming word 93 == 0 means SATA (see ATA-5, ATA-7)
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.17/drivers/ide/ide-iops.c linux-2.6.17/drivers/ide/ide-iops.c
--- linux.vanilla-2.6.17/drivers/ide/ide-iops.c 2006-06-19 17:17:24.000000000 +0100
+++ linux-2.6.17/drivers/ide/ide-iops.c 2006-06-26 14:04:52.101408544 +0100
@@ -597,6 +597,10 @@
{
if(HWIF(drive)->udma_four == 0)
return 0;
+
+ /* Check for SATA but only if we are ATA5 or higher */
+ if (drive->id->hw_config == 0 && (drive->id->major_rev_num & 0x7FE0))
+ return 1;
if (!(drive->id->hw_config & 0x6000))
return 0;
#ifndef CONFIG_IDEDMA_IVB
reply other threads:[~2006-06-26 13:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1151329380.27147.19.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=linux-ide@vger.kernel.org \
--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