rpms/kernel/F-8 linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch, NONE, 1.1 kernel.spec, 1.491, 1.492
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Thu Jul 10 16:18:50 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10885
Modified Files:
kernel.spec
Added Files:
linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch
Log Message:
* Wed Jul 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.10-52
- libata: don't let ata_piix driver attach to ICH6M in ahci mode (F9#430916)
linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch:
--- NEW FILE linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch ---
From: Tejun Heo <htejun at gmail.com>
Date: Wed, 26 Mar 2008 06:46:58 +0000 (+0900)
Subject: ata_piix: don't attach to ICH6M in ahci mode
X-Git-Tag: v2.6.26-rc1~1150^2~53
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5016d7d212dbcc85cdc5130b1228d23f3423bd61
ata_piix: don't attach to ICH6M in ahci mode
ata_piix when attached to ICH6M in AHCI mode doesn't provide any
benefit over using ahci and has detection problems. Don't let
ata_piix claim ICH6M if it's in AHCI mode.
This change makes ICH6R the only one which ata_piix can attach to even
when it's in ahci mode which is necessary as some devices don't work
properly under ahci mode. Drop PIIX_FLAG_AHCI and match the
controller directly so that piix_disable_ahci() is called only for it.
This change makes PIIX_SCC no longer used and it gets dropped too.
This fixes bz 9491.
Signed-off-by: Tejun Heo <htejun at gmail.com>
Cc: Robert M. Albrecht <romal at gmx.de>
Signed-off-by: Jeff Garzik <jeff at garzik.org>
[cebbert at redhat.com : rediff]
---
rhbz 430916
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index eafb984..e6bf4fd 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -100,13 +100,11 @@ enum {
PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
ICH5_PMR = 0x90, /* port mapping register */
ICH5_PCS = 0x92, /* port control and status */
- PIIX_SCC = 0x0A, /* sub-class code register */
PIIX_SIDPR_BAR = 5,
PIIX_SIDPR_LEN = 16,
PIIX_SIDPR_IDX = 0,
PIIX_SIDPR_DATA = 4,
- PIIX_FLAG_AHCI = (1 << 27), /* AHCI possible */
PIIX_FLAG_CHECKINTR = (1 << 28), /* make sure PCI INTx enabled */
PIIX_FLAG_SIDPR = (1 << 29), /* SATA idx/data pair regs */
@@ -237,8 +235,10 @@ static const struct pci_device_id piix_p
{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
/* 82801FR/FRW (ICH6R/ICH6RW) */
{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
- /* 82801FBM ICH6M (ICH6R with only port 0 and 2 implemented) */
- { 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci },
+ /* 82801FBM ICH6M (ICH6R with only port 0 and 2 implemented).
+ * Attach iff the controller is in IDE mode. */
+ { 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID,
+ PCI_CLASS_STORAGE_IDE << 8, 0xffff00, ich6m_sata_ahci },
/* 82801GB/GR/GH (ICH7, identical to ICH6) */
{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
/* 2801GBM/GHM (ICH7M, identical to ICH6M) */
@@ -626,7 +626,7 @@ static struct ata_port_info piix_port_in
[ich6_sata_ahci] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI,
+ .flags = PIIX_SATA_FLAGS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -635,7 +635,7 @@ static struct ata_port_info piix_port_in
[ich6m_sata_ahci] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI,
+ .flags = PIIX_SATA_FLAGS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -644,8 +644,7 @@ static struct ata_port_info piix_port_in
[ich8_sata_ahci] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI |
- PIIX_FLAG_SIDPR,
+ .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -654,8 +653,7 @@ static struct ata_port_info piix_port_in
[ich8_2port_sata] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI |
- PIIX_FLAG_SIDPR,
+ .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -664,7 +662,7 @@ static struct ata_port_info piix_port_in
[tolapai_sata_ahci] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI,
+ .flags = PIIX_SATA_FLAGS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -673,8 +671,7 @@ static struct ata_port_info piix_port_in
[ich8m_apple_sata_ahci] =
{
- .flags = PIIX_SATA_FLAGS | PIIX_FLAG_AHCI |
- PIIX_FLAG_SIDPR,
+ .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
@@ -1659,6 +1656,16 @@ static int __devinit piix_init_one(struc
if (rc)
return rc;
+ /* ICH6R may be driven by either ata_piix or ahci driver
+ * regardless of BIOS configuration. Make sure AHCI mode is
+ * off.
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2652) {
+ int rc = piix_disable_ahci(pdev);
+ if (rc)
+ return rc;
+ }
+
/* SATA map init can change port_info, do it before prepping host */
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
if (!hpriv)
@@ -1674,16 +1681,6 @@ static int __devinit piix_init_one(struc
host->private_data = hpriv;
/* initialize controller */
- if (port_flags & PIIX_FLAG_AHCI) {
- u8 tmp;
- pci_read_config_byte(pdev, PIIX_SCC, &tmp);
- if (tmp == PIIX_AHCI_DEVICE) {
- rc = piix_disable_ahci(pdev);
- if (rc)
- return rc;
- }
- }
-
if (port_flags & ATA_FLAG_SATA) {
piix_init_pcs(host, piix_map_db_table[ent->driver_data]);
piix_init_sidpr(host);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.491
retrieving revision 1.492
diff -u -r1.491 -r1.492
--- kernel.spec 10 Jul 2008 04:11:40 -0000 1.491
+++ kernel.spec 10 Jul 2008 16:17:57 -0000 1.492
@@ -646,6 +646,7 @@
Patch675: linux-2.6-libata-acpi-handle-bay-devices-in-dock-stations.patch
Patch676: linux-2.6-libata-pata_atiixp-dont-disable.patch
Patch677: linux-2.6-libata-retry-enabling-ahci.patch
+Patch678: linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch
Patch680: linux-2.6-wireless.patch
Patch681: linux-2.6-wireless-pending.patch
@@ -1166,6 +1167,8 @@
ApplyPatch linux-2.6-libata-pata_atiixp-dont-disable.patch
# retry enabling AHCI mode before reporting error
ApplyPatch linux-2.6-libata-retry-enabling-ahci.patch
+# fix ahci / ICH6 conflict
+ApplyPatch linux-2.6-libata-ata_piix-dont-attach-to-ich6m-in-ahci-mode.patch
# wireless
#
@@ -1833,6 +1836,9 @@
%changelog
+* Wed Jul 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.10-52
+- libata: don't let ata_piix driver attach to ICH6M in ahci mode (F9#430916)
+
* Wed Jul 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.10-51
- Fix reiserfs list corruption (F9#453699)
More information about the fedora-extras-commits
mailing list