mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 12:46:14 +02:00
virtio: pci: Fix discovery of device config length
The length of the device config was erroneously being taken from the
notify capability. Correct this by finding the length in the device
capability.
Fixes: 550435edf810 ("virtio: pci: Support non-legacy PCI transport device")
Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
30471d5351
commit
da03cdfa7a
@ -497,7 +497,7 @@ static int virtio_pci_probe(struct udevice *udev)
|
||||
*/
|
||||
device = virtio_pci_find_capability(udev, VIRTIO_PCI_CAP_DEVICE_CFG);
|
||||
if (device) {
|
||||
offset = notify + offsetof(struct virtio_pci_cap, length);
|
||||
offset = device + offsetof(struct virtio_pci_cap, length);
|
||||
dm_pci_read_config32(udev, offset, &priv->device_len);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user