Revision 99443c21 hw/pci.c

b/hw/pci.c
139 139
    dev->irq_state = 0;
140 140
    pci_update_irq_status(dev);
141 141
    /* Clear all writeable bits */
142
    pci_set_word(dev->config + PCI_COMMAND,
143
                 pci_get_word(dev->config + PCI_COMMAND) &
144
                 ~pci_get_word(dev->wmask + PCI_COMMAND));
142
    pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
143
                                 pci_get_word(dev->wmask + PCI_COMMAND));
145 144
    dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
146 145
    dev->config[PCI_INTERRUPT_LINE] = 0x0;
147 146
    for (r = 0; r < PCI_NUM_REGIONS; ++r) {

Also available in: Unified diff