pds_core: add auxiliary_bus devices
authorShannon Nelson <shannon.nelson@amd.com>
Wed, 19 Apr 2023 17:04:23 +0000 (10:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Apr 2023 07:29:13 +0000 (08:29 +0100)
commit4569cce43bc61e4cdd76597a1cf9b608846c18cc
tree872165355173e782a83d21332f52c580a9a51964
parentf53d93110aa526ad3df628ad6d9f672c7d5ae285
pds_core: add auxiliary_bus devices

An auxiliary_bus device is created for each vDPA type VF at VF
probe and destroyed at VF remove.  The aux device name comes
from the driver name + VIF type + the unique id assigned at PCI
probe.  The VFs are always removed on PF remove, so there should
be no issues with VFs trying to access missing PF structures.

The auxiliary_device names will look like "pds_core.vDPA.nn"
where 'nn' is the VF's uid.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/pds_core/Makefile
drivers/net/ethernet/amd/pds_core/auxbus.c [new file with mode: 0644]
drivers/net/ethernet/amd/pds_core/core.h
drivers/net/ethernet/amd/pds_core/main.c
include/linux/pds/pds_auxbus.h [new file with mode: 0644]
include/linux/pds/pds_common.h