[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Save trackpad settings during sleep



> 
> On my TiBook, BenH' 2.4.5-pre kernel reprobes all ADB devices after
> wakeup. This, I think, is not new; what's changed is the fact that the
> rescan is not done inline in the wakeup code path, but rather a kernel
> thread is started that does the probe. Wakeup is faster, since we don't
> block on the ADB probe.

But we run pmud before the device wakeup has done. This is extremely bad,
opening /dev/adb should return -EAGAIN while the bus state isn't sane, as 
after sleep (there isn't anything user space related to care about before 
ADB is initialized on boot). I suggest code is added to the adb device
interface to mark it unavailable on sleep or during a bus reset, and mark
it available after bus rescan completes. That way we can make operations
on /dev/adb fail with -EAGAIN when there's no devices configured yet, or a
bus reset is pending. Does anyone see a potential deadlock situation here? 

	Michael



Reply to: