lkml.org 
[lkml]   [2008]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Regression from 2.6.26: Hibernation (possibly suspend) broken on Toshiba R500 (bisected)


On Fri, 5 Dec 2008, Rafael J. Wysocki wrote:
>
> Well, actually I think we should go further and save the standard config
> registers of _all_ PCI devices in the _late() callbacks (ie. with interrupts
> disabled) and restore them in the _early() callbacks.

That would certainly simplify the code.

> I don't really understand why pci_restore_state() is not called by the core
> and every single driver calls it by itself.

The idea was to allow PCI drivers to override it if they wanted to.

That said, the ones that do their own state restore generally do it wrong
(eg the USB host controllers doing things in the wrong order and enabling
the device before having actually written back the BAR values), so it's
arguably broken to let drivers override it.

> IOW, I would split the resume of PCI devices into two parts, the first of
> which will call pci_restore_state() with interrupts disabled and the second
> will do the remaining stuff.

I would definitely not disagree with that - leave the regular
"suspend/resume" callbacks for purely higher-level actions. It would
interesting to hear what it does for you.

Linus


\
 
 \ /
  Last update: 2008-12-05 23:17    [W:0.167 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site