linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rohwer <tr@tng.de>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org, "Gaston, Jason D" <jason.d.gaston@intel.com>
Subject: Re: Hang during boot in piix_init_pcs (ata_piix.c) with macbook pro
Date: Sun, 18 Nov 2007 19:00:56 +0100	[thread overview]
Message-ID: <47407DD8.10301@tng.de> (raw)
In-Reply-To: <47386F3E.8000906@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Hello Tejun,

> Yes, adding a separate entry for ich8m is the correct approach w/
> port_enable=1 seems like the correct approach.  Does it fix the problem?

yes, the hang did not occur anymore after the change.
A patch with respect to linux-2.6.24-rc3 is included as attachment
(Signed-off-by: Thomas Rohwer <tr@tng.de>).
In the pci_device_id table I limited the new mapping to the specific
subvendor (0x106b, 0x00a0), because in general the ich8m can have up to
3 ports. I tested this only on my hardware and I am not sure if this
is the best fix for the issue.

Sincerely,

Thomas Rohwer

[-- Attachment #2: ata_piix.patch --]
[-- Type: text/x-diff, Size: 1893 bytes --]

--- linux-2.6.24-rc3/drivers/ata/ata_piix.c	2007-11-17 06:16:36.000000000 +0100
+++ linux/drivers/ata/ata_piix.c	2007-11-18 02:45:11.000000000 +0100
@@ -131,6 +131,7 @@
 	piix_pata_mwdma		= 10,	/* PIIX3 MWDMA only */
 	tolapai_sata_ahci	= 11,
 	ich9_2port_sata		= 12,
+	ich8m_apple_sata_ahci= 13,
 
 	/* constants for mapping table */
 	P0			= 0,  /* port 0 */
@@ -240,6 +241,8 @@
 	{ 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
 	/* SATA Controller 2 IDE (ICH8) */
 	{ 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata },
+	/* Mobile SATA Controller IDE (ICH8M), Apple */
+	{ 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata_ahci },
 	/* Mobile SATA Controller IDE (ICH8M) */
 	{ 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci },
 	/* SATA Controller IDE (ICH9) */
@@ -461,6 +464,18 @@
 	},
 };
 
+static const struct piix_map_db ich8m_apple_map_db = {
+	.mask = 0x3,
+	.port_enable = 0x1,
+	.map = {
+		/* PM   PS   SM   SS       MAP */
+		{  P0,  NA,  NA,  NA }, /* 00b */
+		{  RV,  RV,  RV,  RV },
+		{  P0,  P2, IDE, IDE }, /* 10b */
+		{  RV,  RV,  RV,  RV },
+	},
+};
+
 static const struct piix_map_db *piix_map_db_table[] = {
 	[ich5_sata]		= &ich5_map_db,
 	[ich6_sata]		= &ich6_map_db,
@@ -469,6 +484,7 @@
 	[ich8_sata_ahci]	= &ich8_map_db,
 	[tolapai_sata_ahci]	= &tolapai_map_db,
 	[ich9_2port_sata]	= &ich9_2port_map_db,
+	[ich8m_apple_sata_ahci]	= &ich8m_apple_map_db,
 };
 
 static struct ata_port_info piix_port_info[] = {
@@ -595,6 +611,18 @@
 		.udma_mask	= ATA_UDMA6,
 		.port_ops	= &piix_sata_ops,
 	},
+
+	[ich8m_apple_sata_ahci] =
+	{
+		.sht		= &piix_sht,
+		.flags		= PIIX_SATA_FLAGS | PIIX_FLAG_SCR |
+				  PIIX_FLAG_AHCI,
+		.pio_mask	= 0x1f,	/* pio0-4 */
+		.mwdma_mask	= 0x07, /* mwdma0-2 */
+		.udma_mask	= ATA_UDMA6,
+		.port_ops	= &piix_sata_ops,
+	},
+
 };
 
 static struct pci_bits piix_enable_bits[] = {

  parent reply	other threads:[~2007-11-18 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-11 14:45 Hang during boot in piix_init_pcs (ata_piix.c) with macbook pro Thomas Rohwer
2007-11-12 15:20 ` Tejun Heo
2007-11-12 22:12   ` Thomas Rohwer
2007-11-18 18:00   ` Thomas Rohwer [this message]
2007-11-19  3:07     ` Tejun Heo
2007-11-19  6:35     ` Tejun Heo
2007-11-19 12:59       ` Thomas Rohwer
2007-11-19 13:05         ` Tejun Heo
2007-11-19 14:11           ` Thomas Rohwer

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=47407DD8.10301@tng.de \
    --to=tr@tng.de \
    --cc=htejun@gmail.com \
    --cc=jason.d.gaston@intel.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 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).