qemu-patch-raspberry4/hw/pci
Peter Xu d4e9b75aa0 pcie: simplify pcie_add_capability()
When we add PCIe extended capabilities, we should be following the rule
that we add the head extended cap (at offset 0x100) first, then the rest
of them. Meanwhile, we are always adding new capability bits at the end
of the list. Here the "next" looks meaningless in all cases since it
should always be zero (along with the "header").

Simplify the function a bit, and it looks more readable now.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2017-02-17 21:52:31 +02:00
..
Makefile.objs pci-hotplug-old: Has been dead for five major releases, bury 2015-03-01 12:37:54 +01:00
msi.c pci: Convert msi_init() to Error and fix callers to check it 2016-07-05 13:14:41 +03:00
msix.c pci: Convert msix_init() to Error and fix callers 2017-02-01 03:37:18 +02:00
pci-stub.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pci.c pci: mark ROMs read-only 2017-02-01 03:37:17 +02:00
pci_bridge.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
pci_host.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pcie.c pcie: simplify pcie_add_capability() 2017-02-17 21:52:31 +02:00
pcie_aer.c pcie_aer: support configurable AER capa version 2017-01-10 07:02:52 +02:00
pcie_host.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
pcie_port.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
shpc.c migration: extend VMStateInfo 2017-01-24 17:54:47 +00:00
slotid_cap.c pci: Clean up includes 2016-01-29 15:07:24 +00:00
trace-events trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00