All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockr@shaw.ca>
To: linux-kernel <linux-kernel@vger.kernel.org>, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: pcim_enable_device BUGs for libata devices in 2.6.20-git6
Date: Sun, 11 Feb 2007 18:44:47 -0600	[thread overview]
Message-ID: <45CFB87F.9060802@shaw.ca> (raw)

I'm seeing BUGs like these on all libata-driven controllers when 
suspending to disk on 2.6.20-git6:

sata_nv 0000:00:07.0: resuming
BUG: at drivers/pci/pci.c:817 pcim_enable_device()

Call Trace:
  [<ffffffff80337d21>] pcim_enable_device+0x8a/0xa5
  [<ffffffff88099d18>] :libata:ata_pci_device_do_resume+0x20/0x59
  [<ffffffff880bb731>] :sata_nv:nv_pci_device_resume+0x1d/0x100
  [<ffffffff8039d2bf>] resume_device+0xcb/0x12c
  [<ffffffff8039d3ac>] dpm_resume+0x8c/0xec
  [<ffffffff8039d456>] device_resume+0x4a/0x5d
  [<ffffffff802a0a33>] pm_suspend_disk+0x160/0x170
  [<ffffffff8029f4b6>] enter_state+0x52/0x1da
  [<ffffffff8029f69c>] state_store+0x5e/0x79
  [<ffffffff802f2b20>] sysfs_write_file+0xe4/0x118
  [<ffffffff80214b58>] vfs_write+0xce/0x177
  [<ffffffff8021553e>] sys_write+0x45/0x6e
  [<ffffffff8025711e>] system_call+0x7e/0x83

It looks like what's happening is that during the "freezing" stage, we 
suspend and then resume the controllers. ata_pci_device_do_suspend only 
calls pci_disable_device if the event is PM_EVENT_SUSPEND but 
ata_pci_device_do_resume calls pcim_enable_device unconditionally. If 
the event was something else, then pcim_enable_device complains because 
the device was previously enabled and never disabled.

Not sure what the best way to fix this is?

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


             reply	other threads:[~2007-02-12  0:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  0:44 Robert Hancock [this message]
2007-02-12  9:11 ` pcim_enable_device BUGs for libata devices in 2.6.20-git6 Tejun Heo
2007-02-12 20:54   ` Pavel Machek
2007-02-13 15:30     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45CFB87F.9060802@shaw.ca \
    --to=hancockr@shaw.ca \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.