From patchwork Mon Oct 18 03:17:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 68111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B5D74B70F8 for ; Mon, 18 Oct 2010 14:45:21 +1100 (EST) Received: from localhost ([127.0.0.1]:46881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7gf1-0006Nj-0D for incoming@patchwork.ozlabs.org; Sun, 17 Oct 2010 23:45:19 -0400 Received: from [140.186.70.92] (port=51895 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7gEl-0002bE-17 for qemu-devel@nongnu.org; Sun, 17 Oct 2010 23:18:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7gEd-00044A-RU for qemu-devel@nongnu.org; Sun, 17 Oct 2010 23:18:10 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:50714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7gEd-00043W-Iu for qemu-devel@nongnu.org; Sun, 17 Oct 2010 23:18:03 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id A1D39188E6; Mon, 18 Oct 2010 12:17:58 +0900 (JST) Received: (nullmailer pid 16506 invoked by uid 1000); Mon, 18 Oct 2010 03:17:56 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Mon, 18 Oct 2010 12:17:44 +0900 Message-Id: <3727d2cbd5cfec32a155a0b70de9de0cf5670648.1287371107.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: skandasa@cisco.com, adnan@khaleel.us, wexu2@cisco.com, mst@redhat.com, yamahata@valinux.co.jp, etmartin@cisco.com Subject: [Qemu-devel] [PATCH v4 03/15] pci: use pci_clear_bit_word() in pci_device_reset() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata --- hw/pci.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e3462a9..5954476 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -137,9 +137,8 @@ static void pci_device_reset(PCIDevice *dev) dev->irq_state = 0; pci_update_irq_status(dev); /* Clear all writeable bits */ - pci_set_word(dev->config + PCI_COMMAND, - pci_get_word(dev->config + PCI_COMMAND) & - ~pci_get_word(dev->wmask + PCI_COMMAND)); + pci_clear_bit_word(dev->config + PCI_COMMAND, + pci_get_word(dev->wmask + PCI_COMMAND)); dev->config[PCI_CACHE_LINE_SIZE] = 0x0; dev->config[PCI_INTERRUPT_LINE] = 0x0; for (r = 0; r < PCI_NUM_REGIONS; ++r) {