summaryrefslogtreecommitdiff
path: root/hw/xio3130_downstream.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-10-25 07:46:47 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-10-27 19:01:59 +0200
commit6bde6aaac6f2af14557ef65f5eb053cb135ca173 (patch)
tree4dfc51485e7b1e40587ff9ec520a5479bb068f35 /hw/xio3130_downstream.c
parentac0cdda347abee6c1aa8a08a7441fc52c6d7badc (diff)
downloadqemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.tar.gz
qemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.tar.bz2
qemu-6bde6aaac6f2af14557ef65f5eb053cb135ca173.zip
pcie: clean up hot plug notification
Simplify logic for hotplug notification, by tracking state of the logical interrupt condition. We then simply use this variable to make the interrupt decision, according to spec. API is made cleaner as we no longer force users to pass in old slot control value. Includes fixes by Isaku Yamahata. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Diffstat (limited to 'hw/xio3130_downstream.c')
-rw-r--r--hw/xio3130_downstream.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c
index a44e188190..854eba8931 100644
--- a/hw/xio3130_downstream.c
+++ b/hw/xio3130_downstream.c
@@ -38,12 +38,9 @@
static void xio3130_downstream_write_config(PCIDevice *d, uint32_t address,
uint32_t val, int len)
{
- uint16_t sltctl =
- pci_get_word(d->config + d->exp.exp_cap + PCI_EXP_SLTCTL);
-
pci_bridge_write_config(d, address, val, len);
pcie_cap_flr_write_config(d, address, val, len);
- pcie_cap_slot_write_config(d, address, val, len, sltctl);
+ pcie_cap_slot_write_config(d, address, val, len);
msi_write_config(d, address, val, len);
/* TODO: AER */
}
@@ -144,6 +141,7 @@ static const VMStateDescription vmstate_xio3130_downstream = {
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
+ .post_load = pcie_cap_slot_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCIE_DEVICE(port.br.dev, PCIESlot),
/* TODO: AER */