[26/39] net/ice/base: support custom ddp package version

Message ID 20220407105706.18889-27-kevinx.liu@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series support full function of DCF |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Kevin Liu April 7, 2022, 10:56 a.m. UTC
  From: Alvin Zhang <alvinx.zhang@intel.com>

Add checking if the current ddp package is a custom package.

Signed-off-by: Steven Zou <steven.zou@intel.com>
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Signed-off-by: Kevin Liu <kevinx.liu@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 8672c41c69..1827993f44 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -1467,6 +1467,10 @@  static void ice_init_pkg_regs(struct ice_hw *hw)
  */
 static enum ice_status ice_chk_pkg_version(struct ice_pkg_ver *pkg_ver)
 {
+	/* 0xFF indicate a custom pkg */
+	if (pkg_ver->major == 0xFF)
+		return ICE_SUCCESS;
+
 	if (pkg_ver->major != ICE_PKG_SUPP_VER_MAJ ||
 	    pkg_ver->minor != ICE_PKG_SUPP_VER_MNR)
 		return ICE_ERR_NOT_SUPPORTED;