From: Adam Belay <abelay@novell.com>
To: Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH 8/9] PCI PM: clear IO and MEM when disabling a device
Date: Mon, 05 Jun 2006 04:46:16 -0400 [thread overview]
Message-ID: <1149497176.7831.162.camel@localhost.localdomain> (raw)
This patch modifies pci_disable_device() to clear IO and MEM from the
COMMAND PCI config register. This is required before entering D3, but
also probably a good general practice for system suspend.
Signed-off-by: Adam Belay <abelay@novell.com>
---
pci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff -urN a/drivers/pci/pci.c b/drivers/pci/pci.c
--- a/drivers/pci/pci.c 2006-05-31 20:40:25.000000000 -0400
+++ b/drivers/pci/pci.c 2006-06-04 15:09:16.000000000 -0400
@@ -312,8 +312,12 @@
u16 pci_command;
pci_read_config_word(dev, PCI_COMMAND, &pci_command);
- if (pci_command & PCI_COMMAND_MASTER) {
- pci_command &= ~PCI_COMMAND_MASTER;
+ if (pci_command & (PCI_COMMAND_MASTER |
+ PCI_COMMAND_IO |
+ PCI_COMMAND_MEMORY)) {
+ pci_command &= ~ (PCI_COMMAND_MASTER |
+ PCI_COMMAND_IO |
+ PCI_COMMAND_MEMORY);
pci_write_config_word(dev, PCI_COMMAND, pci_command);
}
dev->is_busmaster = 0;
next reply other threads:[~2006-06-05 8:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-05 8:46 Adam Belay [this message]
2006-06-05 16:37 ` Rajesh Shah
2006-06-06 0:32 ` Benjamin Herrenschmidt
2006-06-07 3:16 ` Adam Belay
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=1149497176.7831.162.camel@localhost.localdomain \
--to=abelay@novell.com \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome