From: Tejun Heo <htejun@gmail.com>
To: MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
Cc: linux-ide@vger.kernel.org
Subject: Re: ata_piix on MacBook4,1: fail to startup in a certain situation
Date: Thu, 29 May 2008 15:09:13 +0900 [thread overview]
Message-ID: <483E4889.1070501@gmail.com> (raw)
In-Reply-To: <20080529034139.A766529C0D5@m02-blue.in.shared-server.net>
[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]
Thanks for verifying.
MATSUBAYASHI 'Shaolin' Kohji wrote:
> At Thu, 29 May 2008 10:45:18 +0900,
> Tejun Heo wrote:
>> With the patch applied, control should never reach either of the above
>> two lines. Can you please double check?
>
> I applied the following patch to check where the booting stops at
>
>
> --- drivers/ata/ata_piix.c.orig 2008-05-29 12:26:18.000000000 +0900
> +++ drivers/ata/ata_piix.c 2008-05-29 12:20:19.000000000 +0900
> @@ -251,6 +251,7 @@
> { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
> /* Mobile SATA Controller IDE (ICH8M), Apple */
> { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata },
> + { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata },
This should make your controller to use type ich8m_apple_sata.
> /* SATA Controller IDE (ICH9) */
> { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
> /* SATA Controller IDE (ICH9) */
> @@ -526,7 +527,7 @@
>
> [ich8m_apple_sata] =
> {
> - .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
> + .flags = PIIX_SATA_FLAGS,
> .pio_mask = 0x1f, /* pio0-4 */
> .mwdma_mask = 0x07, /* mwdma0-2 */
> .udma_mask = ATA_UDMA6,
Which doesn't have PIIX_FLAG_SIDPR set.
> @@ -1360,6 +1361,8 @@
> if (!(host->ports[0]->flags & PIIX_FLAG_SIDPR))
> return;
And triggers this condition and return.
> +dev_printk(KERN_INFO, &pdev->dev, "PASSED: checking PIIX_FLAG_SIDPR\n");
> +
> if (pci_resource_start(pdev, PIIX_SIDPR_BAR) == 0 ||
> pci_resource_len(pdev, PIIX_SIDPR_BAR) != PIIX_SIDPR_LEN)
> return;
So, it shouldn't get here. Strange. Ah... Crap. Now I see it.
Generic entry for 2828 is above ich8m_apple_sata entry. I wonder how
this ever worked. Here's the updated patch. This is without the SIDPR
change. If this doesn't work please remove PIIX_FLAG_SIDPR from
ich8m_apple_sata entry and see whether that helps.
Thanks.
--
tejun
[-- Attachment #2: ata_piix-apple-2.patch --]
[-- Type: text/x-patch, Size: 912 bytes --]
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index a9027b8..02d6efe 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -247,10 +247,11 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller 2 IDE (ICH8) */
{ 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
- /* Mobile SATA Controller IDE (ICH8M) */
- { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* Mobile SATA Controller IDE (ICH8M), Apple */
{ 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata },
+ { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata },
+ /* Mobile SATA Controller IDE (ICH8M) */
+ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH9) */
{ 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata },
/* SATA Controller IDE (ICH9) */
next prev parent reply other threads:[~2008-05-29 6:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080528075106.F2C3D29C127@m02-blue.in.shared-server.net>
[not found] ` <20080528075747.A18A5114160@m03-blue.in.shared-server.net>
[not found] ` <483D1429.3080804@gmail.com>
2008-05-28 9:21 ` ata_piix on MacBook4,1: fail to startup in a certain situation MATSUBAYASHI 'Shaolin' Kohji
2008-05-28 14:23 ` Tejun Heo
2008-05-28 22:53 ` MATSUBAYASHI 'Shaolin' Kohji
2008-05-29 0:23 ` Tejun Heo
2008-05-29 1:12 ` MATSUBAYASHI 'Shaolin' Kohji
2008-05-29 1:45 ` Tejun Heo
2008-05-29 3:41 ` MATSUBAYASHI 'Shaolin' Kohji
2008-05-29 6:09 ` Tejun Heo [this message]
2008-05-29 8:43 ` MATSUBAYASHI 'Shaolin' Kohji
2008-05-29 9:10 ` Tejun Heo
2008-05-29 9:59 ` MATSUBAYASHI 'Shaolin' Kohji
2008-05-29 12:56 ` 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=483E4889.1070501@gmail.com \
--to=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=shaolin@rhythmaning.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).