linux/drivers/net/ethernet/cavium
Yuho Choi 5c0e3ba4f5 net/liquidio: drop cached VF pci_dev LUT
The PF SR-IOV enable path caches VF pci_dev pointers in
dpiring_to_vfpcidev_lut[] by iterating with pci_get_device(). Those
entries do not own a reference, because the iterator drops the previous
device reference on each step. The cached pointer is then dereferenced
later when handling OCTEON_VF_FLR_REQUEST.

Replace the cached VF mapping with runtime lookup on the mailbox DPI
ring: derive the VF index from q_no, resolve the VF via exported PCI
IOV helpers, validate it with the PF pointer and VF ID, then issue
pcie_flr() and drop the reference with pci_dev_put(). Remove the
unused VF lookup table initialization and cleanup.

Fixes: ca6139ffc6 ("liquidio CN23XX: sysfs VF config support")
Fixes: 8c978d0592 ("liquidio CN23XX: Mailbox support")
Signed-off-by: Yuho Choi <dbgh9129@gmail.com>
Link: https://patch.msgid.link/20260701040847.1897845-1-dbgh9129@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-07 11:03:35 +02:00
..
common time/timecounter: Fix the lie that struct cyclecounter is const 2025-07-01 15:38:25 +02:00
liquidio net/liquidio: drop cached VF pci_dev LUT 2026-07-07 11:03:35 +02:00
octeon net: octeon: mgmt: convert to use ndo_hwtstamp callbacks 2025-11-04 17:43:52 -08:00
thunder net: thunderx: fix PTP device ref leak in nicvf_probe() 2026-05-26 19:03:37 -07:00
Kconfig lib/crc: remove CONFIG_LIBCRC32C 2025-04-04 11:31:42 -07:00
Makefile