WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [Patch] cleanup pciback_reset_device

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Patch] cleanup pciback_reset_device
From: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Date: Mon, 18 Dec 2006 18:21:05 +0900
Delivery-date: Mon, 18 Dec 2006 01:19:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxx>

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: cleanup_pciback_reset_device.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>