Bug 76901
Summary: | ExpressCard hot-remove and hot-add not recognized by acpiphp | ||
---|---|---|---|
Product: | ACPI | Reporter: | Gavin Guo (gavin.guo) |
Component: | Config-Hotplug | Assignee: | Rafael J. Wysocki (rjw) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | bjorn, gavin.guo, jiang.liu, lenb, mika.westerberg, rjw, rui.zhang, yinghai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://marc.info/?l=linux-pci&m=140071437301666 | ||
Kernel Version: | 3.15-rc5 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
dmesg.log
The process of git-bisect for finding the first commit crashing the acpi hot-plugging. Some debug to acpiphp dmesg with debug messages added ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges dmesg of the acpiphp-debug-root-bridge-hotplug.patch ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges |
Description
Gavin Guo
2014-05-26 03:16:25 UTC
Created attachment 137351 [details]
dmesg.log
Reassigning to ACPI/Config-hotplug, let me know if that's wrong. Created attachment 138231 [details]
The process of git-bisect for finding the first commit crashing the acpi hot-plugging.
I've completed the bisect and found 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 is the first bad commit. The "git bisect log" is also attached. commit 2d8b1d566a5f4874f4d92361f5cdbb50baa396f8 Author: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Sat Jul 13 20:09:59 2013 +0300 ACPI / hotplug / PCI: Get rid of check_sub_bridges() Now that acpiphp_check_bridge() always enumerates devices behind the bridge, there is no need to do that for each sub-bridge anymore like it is done in the current ACPI-based PCI hotplug (ACPIPHP) code. Given this we don't need check_sub_bridges() anymore, so drop that function completely. This also simplifies the ACPIPHP code a bit. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> :040000 040000 1f3f81404e06c92c01d6848ed7a6c5bffdb5f878 4e7ca3e4af42738f90555640cafbb6e6522ceedf M drivers Gavin, can you attach acpidump of the machine (or copy of /sys/firmware/acpi/tables/DSDT) as well? Also can you reproduce this with CONFIG_DYNAMIC_DEBUG=y and "acpiphp.dyndbg=+p" in the kernel command line and attach the dmesg, so that we can see a bit more what is happening there. Thanks. Created attachment 138361 [details]
Some debug to acpiphp
I attached a patch that logs a bit more, can you apply this and post the resulting dmesg?
Since you are seeing BUS_CHECK events only to the host bridge, I'm suspecting that we are not calling acpiphp_check_bridge() for that.
The log is attached. How I tested the card: Booting up without the card plugged then, plug and unplug twice. Created attachment 138471 [details]
dmesg with debug messages added
OK, so it looks like acpiphp_check_bridge() is never called for the host bridge and acpiphp_check_host_bridge() never does anything (since acpiphp_dev_to_bridge() returns NULL for host bridge). Rafael, do you remember why we deal host bridges differently here? Shouldn't we enumerate everything behind the bridge if we get BUS_CHECK event even for the host bridge? This is a bug in acpiphp_check_host_bridge(). Or rather in acpiphp_enumerate_slots(). Created attachment 138651 [details]
ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges
Gavin, can you please try this patch (untested so far)?
Rafael, I've tested the patch it works fine on v3.15. The dmesg is also attached for your reference. How I tested the patch: Booting up with the PCI express card attached, then tested the hot-plug 3 times. Created attachment 138691 [details]
dmesg of the acpiphp-debug-root-bridge-hotplug.patch
Thanks Rafael for the quick fix! Created attachment 138851 [details]
ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges
Great, thanks for testing!
Can you also test this somewhat cleaner patch, please?
Rafael & Mika, I've tested the new cleaner patch, and it works fine. :-) How I tested the patch: Booting up with the PCI express card attached, then tested the hot-plug 3 times. Awesome, thanks! I'm going to submit it to the mailing lists for inclusion into 3.16-rc. in Linux-3.16-rc1: commit 882d18a702c66404fcb62b84748f719f9b47441c Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Tue Jun 10 22:46:35 2014 +0200 ACPI / hotplug / PCI: Add hotplug contexts to PCI host bridges |