diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2023-02-16 21:03:49 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-03-02 03:10:49 -0500 |
commit | 5aaed9caf150390bd702a7da86a287a579b20d73 (patch) | |
tree | 72242bbca3058cd8fe7ff3ef36fbe88ecd7ef709 /hw/intc | |
parent | f90d932094c03cb2ebb856a6da4ad0a5b05d9c27 (diff) | |
download | qemu-5aaed9caf150390bd702a7da86a287a579b20d73.zip qemu-5aaed9caf150390bd702a7da86a287a579b20d73.tar.gz qemu-5aaed9caf150390bd702a7da86a287a579b20d73.tar.bz2 |
pcie: introduce pcie_sltctl_powered_off() helper
In pcie_cap_slot_write_config() we check for PCI_EXP_SLTCTL_PWR_OFF in
a bad form. We should distinguish PCI_EXP_SLTCTL_PWR which is a "mask"
and PCI_EXP_SLTCTL_PWR_OFF which is value for that mask.
Better code is in pcie_cap_slot_unplug_request_cb() and in
pcie_cap_update_power(). Let's use same pattern everywhere. To simplify
things add also a helper.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Kuchin <antonkuchin@yandex-team.ru>
Message-Id: <20230216180356.156832-12-vsementsov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/intc')
0 files changed, 0 insertions, 0 deletions