Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable review

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Pavel Machek <pavel@...>
Cc: Matthew Garrett <mjg59@...>, Romano Giannetti <romanol@...>, Chris Wright <chrisw@...>, Chuck Ebbert <cebbert@...>, Linux Kernel Mailing List <linux-kernel@...>, <stable@...>, Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, <akpm@...>, <alan@...>, Rafael J. Wysocki <rjw@...>
Date: Monday, May 28, 2007 - 12:53 pm

On Mon, 28 May 2007, Pavel Machek wrote:

Drivers really shouldn't do anythign at all.


The "subsystem" thing should have stopped the queues, and the device 
should never even _see_ this.

Before we suspend a device, we call the subsystem that that device has 
been registered with. Ie, we have code like this:

	if (dev->class && dev->class->suspend)
		error = dev->class->suspend(dev, state);

which was very much designed so that individual devices wouldn't have to 
always know - if the upper layer devices for that class can handle these 
things, they should.

Do people actually _do_ this, right now? No. But we do actually have the 
infrastructure, and I think we have one or two classes that actually do 
use it (at least the "rfkill_class" has a suspend member, dunno how well 
this model actually works).

I think Greg had some patches to make network drivers use this, for 
example. Network drivers right now all end up doing stuff that really 
doesn't belong in the driver at all when they suspend, and the 
infrastructure _should_ just do it for them (ie do all the _network_ 
related stuff, as opposed to the actual hardware-related stuff).

(Examples of things that we probably _should_ do for network devices on a 
class level:

	suspend:
		netif_poll_disable()
		if (netif_running(dev))
			dev->stop(dev);

	resume:
		if (netif_running(dev))
			dev->start(dev);
		netif_poll_enable(dev);

or something similar).

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 00/69] -stable review, Linus Torvalds, (Tue May 22, 6:07 pm)
Re: [patch 00/69] -stable review, Romano Giannetti, (Thu May 24, 8:06 am)
Re: [patch 00/69] -stable review, Linus Torvalds, (Thu May 24, 12:16 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Thu May 24, 5:03 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Henrique de Moraes Holschuh..., (Thu May 24, 7:16 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Fri May 25, 7:44 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Linus Torvalds, (Mon May 28, 12:53 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Sun May 27, 2:32 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Mon May 28, 4:11 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Sun May 27, 3:09 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Tue May 29, 8:00 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Michael-Luke Jones, (Tue May 29, 8:00 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Tue May 29, 8:16 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Nigel Cunningham, (Thu May 24, 10:20 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Nigel Cunningham, (Thu May 24, 11:00 pm)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Nigel Cunningham, (Fri May 25, 12:33 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Wed May 30, 10:04 am)
Re: pcmcia resume 60 second hang. Re: [patch 00/69] -stable ..., Rafael J. Wysocki, (Wed May 30, 10:08 am)
Long delay in resume from RAM (Was Re: [patch 00/69] -stable..., Romano Giannetti, (Thu May 24, 11:06 am)
Re: Long delay in resume from RAM (Was Re: [patch 00/69] -st..., Johannes Stezenbach, (Thu May 24, 6:30 pm)
Re: [patch 00/69] -stable review, Romano Giannetti, (Wed May 23, 3:09 am)
Re: [patch 00/69] -stable review, Paolo Ornati, (Wed May 23, 3:19 am)
Re: [patch 00/69] -stable review, Romano Giannetti, (Wed May 23, 3:38 am)