121-MP-fix-build-issues.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. From a4378eb29c7b9dd95601d20f507a2220457f8ede Mon Sep 17 00:00:00 2001
  2. From: Ziyang Huang <[email protected]>
  3. Date: Sun, 8 Sep 2024 15:24:07 +0800
  4. Subject: [PATCH] MP: fix build issues
  5. Enable the IN_VSI make flag which enables macro definitions needed to
  6. successfully compile the SSDK for the ipq50xx target. In addition, fix an
  7. incorrect return type by expanding the macro called and return a boolean
  8. instead of an integer.
  9. Signed-off-by: Ziyang Huang <[email protected]>
  10. Signed-off-by: George Moussalem <[email protected]>
  11. ---
  12. config | 30 +-----------------------------
  13. src/adpt/mp/adpt_mp_portctrl.c | 3 ++-
  14. 2 files changed, 3 insertions(+), 30 deletions(-)
  15. diff --git a/config b/config
  16. index 1f74e4f8..58d67648 100644
  17. --- a/config
  18. +++ b/config
  19. @@ -374,6 +374,7 @@ ifneq (, $(filter MPPE APPE HPPE CPPE ALL_CHIP, $(CHIP_TYPE)))
  20. endif
  21. ifneq (, $(filter MP, $(CHIP_TYPE)))
  22. + IN_VSI=TRUE
  23. IN_UNIPHY=TRUE
  24. endif
  25. @@ -436,35 +437,6 @@ endif
  26. # SDK Features According To Specfic Switch #
  27. #############################################
  28. ifeq (MP, $(CHIP_TYPE))
  29. - ifeq (disable, $(ISISC_ENABLE))
  30. - IN_ACL=FALSE
  31. - IN_FDB=FALSE
  32. - IN_IGMP=FALSE
  33. - IN_LEAKY=FALSE
  34. - IN_LED=FALSE
  35. - IN_MIRROR=FALSE
  36. - IN_MISC=FALSE
  37. - IN_PORTVLAN=FALSE
  38. - IN_QOS=FALSE
  39. - IN_RATE=FALSE
  40. - IN_STP=FALSE
  41. - IN_VLAN=FALSE
  42. - IN_REDUCED_ACL=FALSE
  43. - IN_COSMAP=FALSE
  44. - IN_IP=FALSE
  45. - IN_NAT=FALSE
  46. - IN_FLOW=FALSE
  47. - IN_TRUNK=FALSE
  48. - IN_RSS_HASH=FALSE
  49. - IN_SEC=FALSE
  50. - IN_QM=FALSE
  51. - IN_PPPOE=FALSE
  52. - IN_VSI=FALSE
  53. - IN_SERVCODE=FALSE
  54. - IN_BM=FALSE
  55. - IN_SHAPER=FALSE
  56. - IN_POLICER=FALSE
  57. - endif
  58. IN_CTRLPKT=TRUE
  59. endif
  60. diff --git a/src/adpt/mp/adpt_mp_portctrl.c b/src/adpt/mp/adpt_mp_portctrl.c
  61. index db60fc72..c230e214 100644
  62. --- a/src/adpt/mp/adpt_mp_portctrl.c
  63. +++ b/src/adpt/mp/adpt_mp_portctrl.c
  64. @@ -45,7 +45,8 @@ _adpt_mp_gcc_mac_clock_set(a_uint32_t dev_id,
  65. static a_bool_t
  66. _adpt_mp_port_phy_connected (a_uint32_t dev_id, fal_port_t port_id)
  67. {
  68. - ADPT_DEV_ID_CHECK(dev_id);
  69. + if (dev_id >= SW_MAX_NR_DEV)
  70. + return A_FALSE;
  71. /* force port which connect s17c or other device chip*/
  72. if (hsl_port_feature_get(dev_id, port_id, PHY_F_FORCE | PHY_F_SFP)) {
  73. --
  74. 2.40.1