Skip to contentSkip to conversation

Teach drivers don't call may-sleep routines in resume code

PATCH In review Li Shaohua 1 participant 2 messages Nov 17, 2004 – Nov 19, 2004 Suspend to RAM

lore
Share & tools
lore

Li Shaohua

author
#0 lore raw

PATCH 1/1 Teach drivers don't call may-sleep routines in resume code

Hi,
We already found one driver (PCI link device driver) does the odd thing, so alert other drivers.

Thanks,
Shaohua

Documentation/power/devices.txt renamed from Documentation/power/devices.txt.orig +3 -0
@@ -70,6 +70,9 @@ System devices will only be suspended wi
 after all other devices have been suspended. On resume, they will be
 resumed before any other devices, and also with interrupts disabled.
 
+*CAUTION*: The resume methods of drivers (normal devices and system devices)
+should never use any may-sleep methods, since when resume from memory (S3),
+no task is running.
 
 Runtime Power Management
 
author
#1 lore raw
Quoted 9 lines · Li Shaohua

Hi,
We already found one driver (PCI link device driver) does the odd thing, so alert other drivers.

Thanks,
Shaohua

Documentation/power/devices.txt System devices will only be suspended wi · line 75

Quoted 6 lines
Documentation/power/devices.txt renamed from Documentation/power/devices.txt.orig +3 -0
@@ -70,6 +70,9 @@ System devices will only be suspended wi
 after all other devices have been suspended. On resume, they will be
 resumed before any other devices, and also with interrupts disabled.
 
+*CAUTION*: The resume methods of drivers (normal devices and system devices)
+should never use any may-sleep methods, since when resume from memory (S3),
+no task is running.

Oops, the description isn't precise. Some may-sleep routines such as waiting a sempahore are ok in resume routines, but some (kmalloc) are bad. Please ignore it till I get a precise description.

Thanks,
Shaohua