diff --git a/include/osi_common.h b/include/osi_common.h index 14050eb..e3be04c 100644 --- a/include/osi_common.h +++ b/include/osi_common.h @@ -86,7 +86,6 @@ * @brief EQOS generic helper MACROS. * @{ */ -#define OSI_PTP_REQ_CLK_FREQ 250000000U #define OSI_FLOW_CTRL_DISABLE 0U #define OSI_ADDRESS_32BIT 0 #define OSI_ADDRESS_40BIT 1 @@ -140,6 +139,7 @@ /** @} */ #endif /* !OSI_STRIPPED_LIB */ +#define OSI_PTP_REQ_CLK_FREQ 250000000U #define OSI_POLL_COUNT 1000U #ifndef UINT_MAX #define UINT_MAX (~0U) diff --git a/include/osi_dma.h b/include/osi_dma.h index 9151c39..35fc054 100644 --- a/include/osi_dma.h +++ b/include/osi_dma.h @@ -1222,6 +1222,7 @@ nve32_t osi_config_slot_function(struct osi_dma_priv_data *osi_dma, * @retval -1 on failure. */ nve32_t osi_clear_rx_pkt_err_stats(struct osi_dma_priv_data *osi_dma); +#endif /* !OSI_STRIPPED_LIB */ /** * @brief osi_txring_empty - Check if Txring is empty. @@ -1246,7 +1247,6 @@ nve32_t osi_clear_rx_pkt_err_stats(struct osi_dma_priv_data *osi_dma); * @retval 0 if ring has outstanding packets. */ nve32_t osi_txring_empty(struct osi_dma_priv_data *osi_dma, nveu32_t chan); -#endif /* !OSI_STRIPPED_LIB */ /** * @brief osi_get_dma - Get pointer to osi_dma data structure. diff --git a/include/osi_dma_txrx.h b/include/osi_dma_txrx.h index 325a0dd..31299cb 100644 --- a/include/osi_dma_txrx.h +++ b/include/osi_dma_txrx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -48,10 +48,8 @@ #define INCR_TX_DESC_INDEX(idx, x) ((idx) = ((idx) + (1U)) & ((x) - 1U)) /** Increment the rx descriptor index */ #define INCR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) + (1U)) & ((x) - 1U)) -#ifdef OSI_DEBUG /** Decrement the tx descriptor index */ #define DECR_TX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U)) -#endif /* OSI_DEBUG */ #ifndef OSI_STRIPPED_LIB /** Decrement the rx descriptor index */ #define DECR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U)) diff --git a/osi/core/osi_hal.c b/osi/core/osi_hal.c index 84366e1..0a7d513 100644 --- a/osi/core/osi_hal.c +++ b/osi/core/osi_hal.c @@ -2734,6 +2734,11 @@ static nve32_t osi_hal_handle_ioctl(struct osi_core_priv_data *osi_core, case OSI_CMD_GET_HW_FEAT: ret = ops_p->get_hw_features(osi_core, &data->hw_feat); + if (ret >= 0) { + /* Get MAC version */ + ret = osi_get_mac_version(osi_core, &data->arg1_u32); + } + break; case OSI_CMD_SET_SYSTOHW_TIME: diff --git a/osi/dma/osi_dma.c b/osi/dma/osi_dma.c index be19708..2e7dc5d 100644 --- a/osi/dma/osi_dma.c +++ b/osi/dma/osi_dma.c @@ -1102,6 +1102,7 @@ nve32_t osi_config_slot_function(struct osi_dma_priv_data *osi_dma, return 0; } +#endif /* !OSI_STRIPPED_LIB */ nve32_t osi_txring_empty(struct osi_dma_priv_data *osi_dma, nveu32_t chan) { @@ -1109,4 +1110,3 @@ nve32_t osi_txring_empty(struct osi_dma_priv_data *osi_dma, nveu32_t chan) return (tx_ring->clean_idx == tx_ring->cur_tx_idx) ? 1 : 0; } -#endif /* !OSI_STRIPPED_LIB */