http://bugzilla.kernel.org/show_bug.cgi?id=7264





------- Additional Comments From [EMAIL PROTECTED]  2006-10-24 16:12 -------
This patch could replace the old quirk - using DMI as you suggested to
detect the T20, we can just apply the fix to the cardbus bridge when the
T20 is docked.

On the ThinkPad T20 laptop, when hotdocking into the IBM Dock II
station, the _DCK AML (i.e. ACPI based docking function) does not
correctly configure the cardbus controllers on the dock station.
This used to be a pci quirk, but since it is really driver specific,
am moving into the driver.  Also, we are now using DMI to detect
whether the laptop that has docked is a T20, because the fixup isn't
neccessary on other laptops with correctly written AML.

Signed-off-by:  Kristen Carlson Accardi <[EMAIL PROTECTED]>

---
 drivers/pcmcia/yenta_socket.c |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

--- 2.6-mm.orig/drivers/pcmcia/yenta_socket.c
+++ 2.6-mm/drivers/pcmcia/yenta_socket.c
@@ -17,6 +17,7 @@
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/dmi.h>
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/ss.h>
@@ -1076,6 +1077,15 @@ static void yenta_fixup_parent_bridge(st
        }
 }
 
+static struct dmi_system_id __devinitdata t20_dmi_table[] = {
+       {
+               .ident = "IBM ThinkPad T20",
+               .matches = { DMI_MATCH(DMI_BOARD_VENDOR, "IBM"),
+                            DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T20"), },
+       },
+       {},
+};
+
 /*
  * Initialize a cardbus controller. Make sure we have a usable
  * interrupt, and that we can map the cardbus area. Fill in the
@@ -1150,6 +1160,32 @@ static int __devinit yenta_probe (struct
        printk(KERN_INFO "Yenta: CardBus bridge found at %s [%04x:%04x]\n",
                pci_name(dev), dev->subsystem_vendor, dev->subsystem_device);
 
+       /*
+        * see if we are the cardbus controller on the
+        * IBM Dock II
+        */
+       if (dmi_check_system(t20_dmi_table) &&
+               dev->subsystem_device == 0x0148) {
+               u32 val;
+
+               /*
+                * After hot docking, the AML on the
+                * IBM T20 will not correctly configure
+                * the cardbus bridge.  We will need to
+                * fix this up ourselves.  Tie the 2 interrupt
+                * pins to INTA, and configure the multifunction
+                * routing register to handle this.
+                */
+               printk(KERN_INFO "Found IBM Dock II Cardbus Bridge "
+                       "fixing up config");
+               pci_read_config_dword(dev, 0x8c, &val);
+               val = ((val & 0xffffff00) | 0x1002);
+               pci_write_config_dword(dev, 0x8c, val);
+               pci_read_config_dword(dev, 0x80, &val);
+               val = ((val & 0x00ffff00) | 0x2864c077);
+               pci_write_config_dword(dev, 0x80, val);
+
+       }
        yenta_config_init(socket);
 
        /* Disable all events */



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

_______________________________________________
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

Reply via email to