OSDN Git Service

sfc: obtain device mac address based on firmware handle for ef100
authorAlejandro Lucero <alejandro.lucero-palau@amd.com>
Wed, 15 Feb 2023 09:08:26 +0000 (09:08 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 16 Feb 2023 11:03:12 +0000 (12:03 +0100)
commit7e056e2360d9267a20509aa2cdb8905485499e95
tree8c56f895cbb6f50240870cf331ac73acad36d75c
parent25414b2a64ae7ea8742933bd7b1d056e069b15a7
sfc: obtain device mac address based on firmware handle for ef100

Getting device mac address is currently based on a specific MCDI command
only available for the PF. This patch changes the MCDI command to a
generic one for PFs and VFs based on a client handle. This allows both
PFs and VFs to ask for their mac address during initialization using the
CLIENT_HANDLE_SELF.

Moreover, the patch allows other client handles which will be used by
the PF to ask for mac addresses linked to VFs. This is necessary for
suporting the port_function_hw_addr_get devlink function in further
patches.

Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/sfc/ef100_netdev.c
drivers/net/ethernet/sfc/ef100_nic.c
drivers/net/ethernet/sfc/ef100_nic.h