public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usbcore module can't unload after swsusp
@ 2003-08-06 19:42 Micha Feigin
  2003-08-06 21:23 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Micha Feigin @ 2003-08-06 19:42 UTC (permalink / raw)
  To: Kernel list

I am running a patched kernel 2.4.21 with acpi and swsusp ver 1.0.3
with usb compiled in as a module.

When kernel loads for the first time everything works fine, all usb
modules can be loaded and unloaded properly. After suspending and
restarting, the computer comes up fine and everything works. The
problem is that at this point, when I try to unload the usbcore module
it gets to the point of calling usb_hub_cleanup in drivers/usb/hub.c.
At this points it tried to kill khubd with killproc, which works fine
(the process is stoped), with a return value of 0. The problem is that
at this point the function locks on the call
wait_for_completion(&khubd_exited); which never returns, and rmmod gets
locked. I tried changing the DECLARE_COMPLETION call so that it will be
redone each time the module starts but it didn't solve the problem. Any
ideas on how to further persue this or whether there is a known
solution?

Thanx

-- 
Micha Feigin
michf@math.tau.ac.il


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: usbcore module can't unload after swsusp
  2003-08-06 19:42 usbcore module can't unload after swsusp Micha Feigin
@ 2003-08-06 21:23 ` Greg KH
  2003-08-07 19:26   ` Micha Feigin
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2003-08-06 21:23 UTC (permalink / raw)
  To: Micha Feigin; +Cc: Kernel list

On Wed, Aug 06, 2003 at 10:42:06PM +0300, Micha Feigin wrote:
> I am running a patched kernel 2.4.21 with acpi and swsusp ver 1.0.3
> with usb compiled in as a module.
> 
> When kernel loads for the first time everything works fine, all usb
> modules can be loaded and unloaded properly. After suspending and
> restarting, the computer comes up fine and everything works. The
> problem is that at this point, when I try to unload the usbcore module
> it gets to the point of calling usb_hub_cleanup in drivers/usb/hub.c.
> At this points it tried to kill khubd with killproc, which works fine
> (the process is stoped), with a return value of 0. The problem is that
> at this point the function locks on the call
> wait_for_completion(&khubd_exited); which never returns, and rmmod gets
> locked. I tried changing the DECLARE_COMPLETION call so that it will be
> redone each time the module starts but it didn't solve the problem. Any
> ideas on how to further persue this or whether there is a known
> solution?

Unload the usb modules before suspending.

Good luck,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: usbcore module can't unload after swsusp
  2003-08-06 21:23 ` Greg KH
@ 2003-08-07 19:26   ` Micha Feigin
  0 siblings, 0 replies; 3+ messages in thread
From: Micha Feigin @ 2003-08-07 19:26 UTC (permalink / raw)
  To: Kernel list

On Thu, 2003-08-07 at 00:23, Greg KH wrote:
> On Wed, Aug 06, 2003 at 10:42:06PM +0300, Micha Feigin wrote:
> > I am running a patched kernel 2.4.21 with acpi and swsusp ver 1.0.3
> > with usb compiled in as a module.
> > 
> > When kernel loads for the first time everything works fine, all usb
> > modules can be loaded and unloaded properly. After suspending and
> > restarting, the computer comes up fine and everything works. The
> > problem is that at this point, when I try to unload the usbcore module
> > it gets to the point of calling usb_hub_cleanup in drivers/usb/hub.c.
> > At this points it tried to kill khubd with killproc, which works fine
> > (the process is stoped), with a return value of 0. The problem is that
> > at this point the function locks on the call
> > wait_for_completion(&khubd_exited); which never returns, and rmmod gets
> > locked. I tried changing the DECLARE_COMPLETION call so that it will be
> > redone each time the module starts but it didn't solve the problem. Any
> > ideas on how to further persue this or whether there is a known
> > solution?
> 
> Unload the usb modules before suspending.
> 
> Good luck,
> 
> greg k-h

Guess I wasn't clear enough. I unload all the modules (except for the fw
ones actually since for some reason they refuse to do so).
This includes the usb modules, before I suspend.
There some more info on the subject though. Apparently this happens only
when calling the hibernation script (from the swsusp page on
sourceforge) from acpid in response to the sleep button. When called
from the command line I don't see this behavior.
-- 
Micha Feigin
michf@math.tau.ac.il


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-07 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-06 19:42 usbcore module can't unload after swsusp Micha Feigin
2003-08-06 21:23 ` Greg KH
2003-08-07 19:26   ` Micha Feigin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox