mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
virpci:fix Secondary Bus Reset bug
The parent bridge configuration of the current device should be read and reset, instead of reading the current device configuration. Signed-off-by: He Xin <hexin15@baidu.com> Signed-off-by: Liu Qi <liuqi16@baidu.com> Signed-off-by: Zhang Yu <zhangyu31@baidu.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
52dad8c9b0
commit
e9c6158838
@ -839,7 +839,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevicePtr dev,
|
||||
/* Read the control register, set the reset flag, wait 200ms,
|
||||
* unset the reset flag and wait 200ms.
|
||||
*/
|
||||
ctl = virPCIDeviceRead16(dev, cfgfd, PCI_BRIDGE_CONTROL);
|
||||
ctl = virPCIDeviceRead16(dev, parentfd, PCI_BRIDGE_CONTROL);
|
||||
|
||||
virPCIDeviceWrite16(parent, parentfd, PCI_BRIDGE_CONTROL,
|
||||
ctl | PCI_BRIDGE_CTL_RESET);
|
||||
|
Loading…
Reference in New Issue
Block a user