Bug 194885

Summary: docked sysfs file always reports 0
Product: ACPI Reporter: Kevin Locke (kevin)
Component: Config-HotplugAssignee: Zhang Rui (rui.zhang)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: pali, rjw, rui.zhang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.10.1 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: acpidump for Lenovo ThinkPad T430 (2342-CTO) with BIOS G1ETB2WW (2.72)

Description Kevin Locke 2017-03-14 22:04:25 UTC
On a Lenovo ThinkPad T430 (2342-CTO) with kernel 4.10.1 (and presumably earlier) the "docked" sysfs file always contains 0 for both the ata_bay and battery_bay dock devices (the only dock devices present).  This holds true with either a hard drive or DVD drive in the UltraBay both at boot and after hotplug.

I reported the issue on the linux-acpi mailing list[1] and am filing it here for tracking.

Let me know if an acpidump or any other information would be helpful to debug.

Thanks,
Kevin

1.  https://marc.info/?l=linux-acpi&m=148952016304094&w=2
Comment 1 Zhang Rui 2017-03-27 23:34:38 UTC
yes, acpidump would be helpful.
Comment 2 Kevin Locke 2017-03-27 23:40:02 UTC
Created attachment 255583 [details]
acpidump for Lenovo ThinkPad T430 (2342-CTO) with BIOS G1ETB2WW (2.72)
Comment 3 Rafael J. Wysocki 2017-04-12 10:00:15 UTC
Does this patch:

https://patchwork.kernel.org/patch/9674333/

make any difference?
Comment 4 Kevin Locke 2017-04-12 19:17:53 UTC
Yes!

With patch https://patchwork.kernel.org/patch/9674333/ applied to b9b3322f13f3 the "docked" sysfs file for the ata_bay dock correctly shows 1 when either a DVD or HD drive is present and 0 when empty, both on boot and after removal/reinsertion.

The "docked" sysfs file for the battery_bay dock device still always shows 0 whether or not the main battery is connected.  However, upon further reflection, I think this is the expected behavior, assuming the battery_bay dock device refers to the battery connector in the UltraBay slot and that there is no dock device to represent the main battery.  (I do not have a battery for the UltraBay slot to test.)

So I think that patch fully fixes the issue.  Thanks!
Comment 5 Rafael J. Wysocki 2017-04-13 02:41:41 UTC
Cool, thanks!