mirror of https://gitee.com/openkylin/qemu.git
pci: use pci_word_test_and_clear_mask() in pci_device_reset()
use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
a5d1fd20cc
commit
99443c21b0
5
hw/pci.c
5
hw/pci.c
|
@ -139,9 +139,8 @@ static void pci_device_reset(PCIDevice *dev)
|
||||||
dev->irq_state = 0;
|
dev->irq_state = 0;
|
||||||
pci_update_irq_status(dev);
|
pci_update_irq_status(dev);
|
||||||
/* Clear all writeable bits */
|
/* Clear all writeable bits */
|
||||||
pci_set_word(dev->config + PCI_COMMAND,
|
pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
|
||||||
pci_get_word(dev->config + PCI_COMMAND) &
|
pci_get_word(dev->wmask + PCI_COMMAND));
|
||||||
~pci_get_word(dev->wmask + PCI_COMMAND));
|
|
||||||
dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
|
dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
|
||||||
dev->config[PCI_INTERRUPT_LINE] = 0x0;
|
dev->config[PCI_INTERRUPT_LINE] = 0x0;
|
||||||
for (r = 0; r < PCI_NUM_REGIONS; ++r) {
|
for (r = 0; r < PCI_NUM_REGIONS; ++r) {
|
||||||
|
|
Loading…
Reference in New Issue