aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/octeontx/q_struct.h
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-04-21 16:11:05 +0000
committerTom Rini <trini@konsulko.com>2022-05-03 15:50:45 -0400
commite7870c2cdccef3a3a8659995407280900323b9f5 (patch)
tree6f5b3892e0a06fb938266a94e4efab9ac1a335f9 /drivers/net/octeontx/q_struct.h
parent6a8cb878a24257ea64dfbd0f5493f07759eb5a0d (diff)
virtio: pci: Read entire capability into memory
Read the virtio PCI capability out of the device configuration space to a struct rather than accessing fields directly from the configuration space as they are needed. This both makes access to the fields easier and avoids re-reading fields. Re-reading fields could result in time-of-check to time-of-use problems, should the value in the configuration space change. The range check of the `bar` field and the later call to `dm_pci_read_bar32()` is an example of where this could happen. Signed-off-by: Andrew Scull <ascull@google.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/net/octeontx/q_struct.h')
0 files changed, 0 insertions, 0 deletions