Revision 89d437df hw/pci.c

b/hw/pci.c
143 143
    pci_word_test_and_clear_mask(dev->config + PCI_COMMAND,
144 144
                                 pci_get_word(dev->wmask + PCI_COMMAND) |
145 145
                                 pci_get_word(dev->w1cmask + PCI_COMMAND));
146
    pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
147
                                 pci_get_word(dev->wmask + PCI_STATUS) |
148
                                 pci_get_word(dev->w1cmask + PCI_STATUS));
146 149
    dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
147 150
    dev->config[PCI_INTERRUPT_LINE] = 0x0;
148 151
    for (r = 0; r < PCI_NUM_REGIONS; ++r) {
......
552 555
           config_size - PCI_CONFIG_HEADER_SIZE);
553 556
}
554 557

  
558
static void pci_init_w1cmask(PCIDevice *dev)
559
{
560
    /*
561
     * Note: It's okay to set w1mask even for readonly bits as
562
     * long as their value is hardwired to 0.
563
     */
564
    pci_set_word(dev->w1cmask + PCI_STATUS,
565
                 PCI_STATUS_PARITY | PCI_STATUS_SIG_TARGET_ABORT |
566
                 PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_REC_MASTER_ABORT |
567
                 PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY);
568
}
569

  
555 570
static void pci_init_wmask_bridge(PCIDevice *d)
556 571
{
557 572
    /* PCI_PRIMARY_BUS, PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS and
......
676 691
    }
677 692
    pci_init_cmask(pci_dev);
678 693
    pci_init_wmask(pci_dev);
694
    pci_init_w1cmask(pci_dev);
679 695
    if (is_bridge) {
680 696
        pci_init_wmask_bridge(pci_dev);
681 697
    }

Also available in: Unified diff