From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [Patch] cleanup pciback_reset_device
Date: Mon, 18 Dec 2006 18:21:05 +0900 [thread overview]
Message-ID: <2AC72285D84C8Dtakebe_akio@jp.fujitsu.com> (raw)
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 873 bytes --]
Hi,
This patch is for cleanup of pciback_reset_device.
is_enabled=0 and is_busmaster=0 are not necessary
because pci_disable_device() do them.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
diff -r c6f637694b85 linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c
--- a/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c Fri Dec 15 11:
53:45 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c Mon Dec 18 08:
58:43 2006 +0900
@@ -22,11 +22,7 @@ void pciback_reset_device(struct pci_dev
/* Disable devices (but not bridges) */
if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
pci_disable_device(dev);
-
pci_write_config_word(dev, PCI_COMMAND, 0);
-
- dev->is_enabled = 0;
- dev->is_busmaster = 0;
} else {
pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (cmd & (PCI_COMMAND_INVALIDATE)) {
Best Regards,
Akio Takebe
[-- Attachment #2: cleanup_pciback_reset_device.patch --]
[-- Type: application/octet-stream, Size: 641 bytes --]
diff -r c6f637694b85 linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c
--- a/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c Fri Dec 15 11:53:45 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c Mon Dec 18 08:58:43 2006 +0900
@@ -22,11 +22,7 @@ void pciback_reset_device(struct pci_dev
/* Disable devices (but not bridges) */
if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
pci_disable_device(dev);
-
pci_write_config_word(dev, PCI_COMMAND, 0);
-
- dev->is_enabled = 0;
- dev->is_busmaster = 0;
} else {
pci_read_config_word(dev, PCI_COMMAND, &cmd);
if (cmd & (PCI_COMMAND_INVALIDATE)) {
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-12-18 9:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-18 9:21 Akio Takebe [this message]
2006-12-18 9:33 ` [Patch] cleanup pciback_reset_device Keir Fraser
2006-12-18 13:26 ` Akio Takebe
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=2AC72285D84C8Dtakebe_akio@jp.fujitsu.com \
--to=takebe_akio@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/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.