lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/7] PCI PM: Fix saving of device state in pci_legacy_suspend
Date
Benjamin Herrenschmidt wrote:
> Minor nit: Should the warning be preceeded by a message ? The reason is,
> right now, all we get is a backtrace, it doesn't actually tell you which
> device or driver caused it which makes it pretty pointless.
>
> I think you should add a printk(KERN_ERR... just before that which gives
> those informations along with a little blurb along the lines of "driver
> changed device state without saving config space state").

That is actually already included in the patch (through drv->suspend):

> - if (WARN_ON_ONCE(pci_dev->current_state != PCI_D0))
> + if (pci_dev->current_state != PCI_D0
> + && pci_dev->current_state != PCI_UNKNOWN) {
> + WARN_ONCE(pci_dev->current_state != prev,
> + "PCI PM: Device state not saved by %pF\n",
> + drv->suspend);

Cheers,
FJP


\
 
 \ /
  Last update: 2009-02-04 11:17    [W:0.082 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site