[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 03/14] pci: use pci_word_test_and_clear_mask() in
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH v5 03/14] pci: use pci_word_test_and_clear_mask() in pci_device_reset() |
Date: |
Tue, 19 Oct 2010 18:06:30 +0900 |
use pci_clear_bit_word() in pci_device_reset() where appropriate.
Signed-off-by: Isaku Yamahata <address@hidden>
---
Changes v4 -> v5
- use pci_word_test_and_clear_mask()
---
hw/pci.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 300079f..409e2c0 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -139,9 +139,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_word_test_and_clear_mask(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) {
--
1.7.1.1
- [Qemu-devel] [PATCH v5 00/14] pcie port switch emulators, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 04/14] pci/bridge: fix pci_bridge_reset(), Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 13/14] pcie/hotplug: introduce pushing attention button command, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 03/14] pci: use pci_word_test_and_clear_mask() in pci_device_reset(),
Isaku Yamahata <=
- [Qemu-devel] [PATCH v5 02/14] pci: introduce helper function to handle msi-x and msi., Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 14/14] pcie/aer: glue aer error injection into qemu monitor, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 01/14] pci: introduce helper functions to test-and-{clear, set} mask in configuration space, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 06/14] pcie: add pcie constants to pcie_regs.h, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 12/14] x3130: pcie downstream port, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 07/14] pcie: helper functions for pcie capability and extended capability, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 08/14] pcie/aer: helper functions for pcie aer capability, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 11/14] x3130: pcie upstream port, Isaku Yamahata, 2010/10/19
- [Qemu-devel] [PATCH v5 09/14] pcie port: define struct PCIEPort/PCIESlot and helper functions, Isaku Yamahata, 2010/10/19