diff --git a/include/osi_common.h b/include/osi_common.h index 5ab0de5..49194b6 100644 --- a/include/osi_common.h +++ b/include/osi_common.h @@ -158,7 +158,7 @@ #endif /* !OSI_STRIPPED_LIB */ #define OSI_PTP_REQ_CLK_FREQ 250000000U -#define OSI_POLL_COUNT 1000U +#define OSI_POLL_COUNT 10000U #ifndef UINT_MAX /** Max value of uint */ #define UINT_MAX (0xFFFFFFFFU) diff --git a/osi/core/core_common.c b/osi/core/core_common.c index 2a7d311..73b729a 100644 --- a/osi/core/core_common.c +++ b/osi/core/core_common.c @@ -30,7 +30,7 @@ nve32_t poll_check(struct osi_core_priv_data *const osi_core, nveu8_t *addr, nveu32_t bit_check, nveu32_t *value) { - nveu32_t retry = RETRY_COUNT; + nveu32_t retry = OSI_POLL_COUNT; nve32_t cond = COND_NOT_MET; nveu32_t count; nve32_t ret = 0; @@ -51,8 +51,7 @@ nve32_t poll_check(struct osi_core_priv_data *const osi_core, nveu8_t *addr, if ((*value & bit_check) == OSI_NONE) { cond = COND_MET; } else { - osi_core->osd_ops.usleep_range(OSI_DELAY_1000US, - OSI_DELAY_1000US + MIN_USLEEP_10US); + osi_core->osd_ops.udelay(OSI_DELAY_1US); } } fail: @@ -837,7 +836,7 @@ static inline nve32_t hw_est_read(struct osi_core_priv_data *osi_core, } if (((val & MTL_EST_ERR0) == MTL_EST_ERR0) || - (retry <= 0)) { + (retry <= 0U)) { ret = -1; goto err; } @@ -1148,7 +1147,7 @@ static nve32_t hw_est_write(struct osi_core_priv_data *osi_core, } if (((val & MTL_EST_ERR0) == MTL_EST_ERR0) || - (retry <= 0)) { + (retry <= 0U)) { ret = -1; } diff --git a/osi/core/eqos_core.c b/osi/core/eqos_core.c index a909fa2..fcc48ff 100644 --- a/osi/core/eqos_core.c +++ b/osi/core/eqos_core.c @@ -2336,7 +2336,7 @@ static inline nve32_t eqos_poll_for_update_ts_complete( struct osi_core_priv_data *const osi_core, nveu32_t *mac_tcr) { - nveu32_t retry = RETRY_COUNT; + nveu32_t retry = OSI_POLL_COUNT; nveu32_t count; nve32_t cond = COND_NOT_MET; nve32_t ret = 0; @@ -2358,7 +2358,7 @@ static inline nve32_t eqos_poll_for_update_ts_complete( } count++; - osi_core->osd_ops.usleep_range(OSI_DELAY_1000US, OSI_DELAY_1000US + MIN_USLEEP_10US); + osi_core->osd_ops.udelay(OSI_DELAY_1US); } fail: return ret; diff --git a/osi/core/mgbe_core.c b/osi/core/mgbe_core.c index e1b7120..d2ea5b9 100644 --- a/osi/core/mgbe_core.c +++ b/osi/core/mgbe_core.c @@ -4563,8 +4563,7 @@ static inline nve32_t mgbe_poll_for_update_ts_complete( } retry++; - osi_core->osd_ops.usleep_range(OSI_DELAY_1000US, - OSI_DELAY_1000US + MIN_USLEEP_10US); + osi_core->osd_ops.udelay(OSI_DELAY_1US); } return ret;