diff options
Diffstat (limited to 'drivers/net/ark/ark_ddm.c')
-rw-r--r-- | drivers/net/ark/ark_ddm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c index eea388a1..57026f8d 100644 --- a/drivers/net/ark/ark_ddm.c +++ b/drivers/net/ark/ark_ddm.c @@ -11,14 +11,22 @@ int ark_ddm_verify(struct ark_ddm_t *ddm) { + uint32_t hw_const; if (sizeof(struct ark_ddm_t) != ARK_DDM_EXPECTED_SIZE) { PMD_DRV_LOG(ERR, "ARK: DDM structure looks incorrect %d vs %zd\n", ARK_DDM_EXPECTED_SIZE, sizeof(struct ark_ddm_t)); return -1; } - if (ddm->cfg.const0 != ARK_DDM_CONST) { - PMD_DRV_LOG(ERR, "ARK: DDM module not found as expected 0x%08x\n", + hw_const = ddm->cfg.const0; + if (hw_const == ARK_DDM_CONST1) { + PMD_DRV_LOG(ERR, + "ARK: DDM module is version 1, " + "PMD expects version 2\n"); + return -1; + } else if (hw_const != ARK_DDM_CONST2) { + PMD_DRV_LOG(ERR, + "ARK: DDM module not found as expected 0x%08x\n", ddm->cfg.const0); return -1; } |