Re: 2.6.26.[1-3] + x61 tablet + x6ultrabase: no resume afterundocking

From: Henrique de Moraes Holschuh
Date: Mon Sep 01 2008 - 07:28:39 EST


On Mon, 01 Sep 2008, Tomas Carnecky wrote:
> There is one question though that was never answered: Is there any
> interaction needed from the userspace when docking/undocking? Something

Yes. umount filesystems on any device in the dock, and issue the "power off
dock" command (i.e. tell the kernel to *eject* the dock). This is *very*
important, although the ThinkPad firmware/hardware will _try_ to protect the
electronics if you just pull the laptop off the dock while it is still
powered (but it might just not be able to do it, so Don't Do That!).

Anyway, if your dock led is going off before you remove the laptop from the
dock, you're doing everything correctly as far as the hardware is concerned.

And the kernel will scream bloody murder if you remove a device with live
filesystems in it, so it should be trivial to check if that part is being
taken care of by your userspace as well. Not that something like this would
be an excuse to fail to suspend/resume after being undocked, mind you.

> That behavior is consistent with my earlier experience, that is: If the
> notebook was _ever_ running in the docking station, it won't resume
> outside of it. No matter whether I start it outside the dock and then
> put it into the dock, or start it up in the dock - once the notebook has
> been docked, suspend/resume outside of the dock won't work anymore.
> My wild uneducated guess is that the kernel doesn't remove/disable some
> devices when undocking (the bay device?) and when it tries to resume
> without them present it will hang.

Your uneducated guess might well be right, there are a lot of patches for
dock that are not in mainline yet. You clearly are experiencing some sort
of Linux bug, that much is pretty clear to me.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/