diff options
author | Andrew Scull <ascull@google.com> | 2022-04-21 16:11:05 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-05-03 15:50:45 -0400 |
commit | e7870c2cdccef3a3a8659995407280900323b9f5 (patch) | |
tree | 6f5b3892e0a06fb938266a94e4efab9ac1a335f9 /drivers/net/octeontx/q_struct.h | |
parent | 6a8cb878a24257ea64dfbd0f5493f07759eb5a0d (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