I have Lenovo T520 with one SSD and one SATA drive. I tried to upgrade to Linux 4.0 and found that after suspend and resume I can't access the second (SATA) drive. I see I/O errors. Both drives have bios encryption enabled. I did a bisect and found that the following patch causes the issue: commit 5d5132059a1f652de9dc2d62a8ff15561e648d11 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Sat Feb 22 00:48:31 2014 +0100 ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices Modify the SATA subsystem to add hotplug contexts to ACPI companions of SATA devices and ports instead of registering special ACPI dock operations using register_hotplug_dock_device(). That change will allow the entire code handling those special ACPI dock operations to be dropped in the next commit. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Tejun Heo <tj@kernel.org> What other information would you need. I'm not sure what debug info to provide.
First, please attach dmesg including a suspend-resume cycle from both the good and the failing kernels.
Created attachment 175951 [details] dmesg OK
Created attachment 175961 [details] dmesg FAIL hackman@terion:~$ ll /storage/ ls: /storage/: Input/output error ls: reading directory /storage/: Input/output error These are the actual mounts. /dev/sdb6 on /sdb type ext4 (rw,noatime,nodiratime) /sdb/storage on /storage type none (rw,bind)
sdb is the SATA drive. sda is the SSD(also the main drive of the machine). If you want I can test what will happen if I boot from the SATA instead of the SSD.
Created attachment 175971 [details] Add debug prints in ata hotplug function dmesg_fail: ... ... PM: resume of devices complete after 621.025 msecs Restarting tasks ... done. video LNXVIDEO:00: Restoring backlight state video LNXVIDEO:01: Restoring backlight state ata2.00: disabled ata2.00: detaching (SCSI 1:0:0:0) ... ... Somehow, the SATA drive is detached, I suppose it received an eject event but that should be also true for pre v3.15 kernels. Anyway, I prepared a debug patch to see if it is really the case, please apply it and attach the dmesg after resume. Thanks.
Here is my bisect log: ((no):~/Projects/linux-stable$ git bi log git bisect start # bad: [41b67d8f304f0c414b41eee2ede98caf897012a8] Linux 3.15.1 git bisect bad 41b67d8f304f0c414b41eee2ede98caf897012a8 # good: [387df1bd3fc46bc695b317dda38b3254f4409036] Linux 3.14.1 git bisect good 387df1bd3fc46bc695b317dda38b3254f4409036 # good: [455c6fdbd219161bd09b1165f11699d6d73de11c] Linux 3.14 git bisect good 455c6fdbd219161bd09b1165f11699d6d73de11c # bad: [c96d6660dc65b0a90aea9834bfd8be1d5656da18] kernel: audit/fix non-modular users of module_init in core code git bisect bad c96d6660dc65b0a90aea9834bfd8be1d5656da18 # bad: [c12e69c6aaf785fd307d05cb6f36ca0e7577ead7] Merge tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect bad c12e69c6aaf785fd307d05cb6f36ca0e7577ead7 # bad: [4b1779c2cf030c68aefe939d946475e4136c1895] Merge tag 'pci-v3.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci git bisect bad 4b1779c2cf030c68aefe939d946475e4136c1895 # good: [683b6c6f82a60fabf47012581c2cfbf1b037ab95] Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip git bisect good 683b6c6f82a60fabf47012581c2cfbf1b037ab95 # bad: [3786075b5ebc8c4eaefd9e3ebf72883934fb64b3] Merge tag 'regulator-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator git bisect bad 3786075b5ebc8c4eaefd9e3ebf72883934fb64b3 # bad: [d64b3932531cbc0c9d6bdb744446934435e9d6af] Merge tag 'pinctrl-v3.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl git bisect bad d64b3932531cbc0c9d6bdb744446934435e9d6af # bad: [36cc86e8ec1a0ab309052bc9b25e48a31288b8a5] Merge branches 'pm-runtime' and 'pm-sleep' git bisect bad 36cc86e8ec1a0ab309052bc9b25e48a31288b8a5 # bad: [e25c5abf4125526d62417f8b5a314e743eefe900] Merge branches 'acpi-cleanup', 'acpi-thermal', 'acpi-pci', 'acpi-lpss' and 'acpi-button' git bisect bad e25c5abf4125526d62417f8b5a314e743eefe900 # good: [3b52b21fa1f44c8956e21dfba645eda959111b5e] ACPI / dock: Use ACPI device object pointers instead of ACPI handles git bisect good 3b52b21fa1f44c8956e21dfba645eda959111b5e # bad: [75c44eddcb4989b85826143bc09fd3ad120abd4e] Merge branch 'acpi-config' git bisect bad 75c44eddcb4989b85826143bc09fd3ad120abd4e # bad: [1e3bcb596c6b1cf6db93f8f506e2de260e771bad] ACPI / hotplug: Rework deferred execution of acpi_device_hotplug() git bisect bad 1e3bcb596c6b1cf6db93f8f506e2de260e771bad # bad: [5d5132059a1f652de9dc2d62a8ff15561e648d11] ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices git bisect bad 5d5132059a1f652de9dc2d62a8ff15561e648d11 # good: [be27b3dcb02335ec093b81053fc8c84b32d3106e] ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context git bisect good be27b3dcb02335ec093b81053fc8c84b32d3106e # first bad commit: [5d5132059a1f652de9dc2d62a8ff15561e648d11] ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices dmesg with debug info is comming in :)
Created attachment 175981 [details] dmesg FAIL2
So the SATA device node really gets an eject event for some reason. acpidump please: # acpidump > acpidump.txt Thanks.
Created attachment 175991 [details] acpidump
Is the SATA drive attached to an ejectable place or just a normal SATA port?
It is in the removable bay. I've replaced the CD with the SATA drive.
Did you have CONFIG_ACPI_DOCK set?
No I did not, because I'm not using a dock ;) I rebuild the kernel with ACPI_DOCK and it FIXED the problem. Tonight I'll check if it will work with 4.0 kernel as well. Thank you very much!
Created attachment 176171 [details] set is_dock_station flag for ACPI device node in scan Marian, Please test this patch with CONFIG_ACPI_DOCK unselected(as you have done before), it should fix your problem. I think we need such a patch, or we may have another bug report of the same problem in the future. Thanks.
ping?
Sorry, I'll send you results within the next 24hours.