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 <[EMAIL PROTECTED]>).
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
--- 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[] = {