efx_devlink.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /****************************************************************************
  3. * Driver for AMD network controllers and boards
  4. * Copyright (C) 2023, Advanced Micro Devices, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation, incorporated herein by reference.
  9. */
  10. #ifndef _EFX_DEVLINK_H
  11. #define _EFX_DEVLINK_H
  12. #include "net_driver.h"
  13. #include <net/devlink.h>
  14. /* Custom devlink-info version object names for details that do not map to the
  15. * generic standardized names.
  16. */
  17. #define EFX_DEVLINK_INFO_VERSION_FW_MGMT_SUC "fw.mgmt.suc"
  18. #define EFX_DEVLINK_INFO_VERSION_FW_MGMT_CMC "fw.mgmt.cmc"
  19. #define EFX_DEVLINK_INFO_VERSION_FPGA_REV "fpga.rev"
  20. #define EFX_DEVLINK_INFO_VERSION_DATAPATH_HW "fpga.app"
  21. #define EFX_DEVLINK_INFO_VERSION_DATAPATH_FW DEVLINK_INFO_VERSION_GENERIC_FW_APP
  22. #define EFX_DEVLINK_INFO_VERSION_SOC_BOOT "coproc.boot"
  23. #define EFX_DEVLINK_INFO_VERSION_SOC_UBOOT "coproc.uboot"
  24. #define EFX_DEVLINK_INFO_VERSION_SOC_MAIN "coproc.main"
  25. #define EFX_DEVLINK_INFO_VERSION_SOC_RECOVERY "coproc.recovery"
  26. #define EFX_DEVLINK_INFO_VERSION_FW_EXPROM "fw.exprom"
  27. #define EFX_DEVLINK_INFO_VERSION_FW_UEFI "fw.uefi"
  28. #define EFX_MAX_VERSION_INFO_LEN 64
  29. int efx_probe_devlink_and_lock(struct efx_nic *efx);
  30. void efx_probe_devlink_unlock(struct efx_nic *efx);
  31. void efx_fini_devlink_lock(struct efx_nic *efx);
  32. void efx_fini_devlink_and_unlock(struct efx_nic *efx);
  33. #ifdef CONFIG_SFC_SRIOV
  34. struct efx_rep;
  35. void ef100_pf_set_devlink_port(struct efx_nic *efx);
  36. void ef100_rep_set_devlink_port(struct efx_rep *efv);
  37. void ef100_pf_unset_devlink_port(struct efx_nic *efx);
  38. void ef100_rep_unset_devlink_port(struct efx_rep *efv);
  39. #endif
  40. #endif /* _EFX_DEVLINK_H */