nvethernetrm: Fix Linux safety builds issues

Issue:
Observed compilation issues
on the nvethernet driver
for DRIVE Linux safety builds.

Fix:
Move out required defines from OSI_STRIPPED_LIB

Bug 3939603

Change-Id: I2418b2b3bd21b5ed4e7e75a3b585f2f542a451c1
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2843094
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mohan Thadikamalla
2023-01-13 13:46:55 +05:30
committed by mobile promotions
parent a65d45e6c9
commit 43efa1f979
5 changed files with 9 additions and 6 deletions

View File

@@ -86,7 +86,6 @@
* @brief EQOS generic helper MACROS. * @brief EQOS generic helper MACROS.
* @{ * @{
*/ */
#define OSI_PTP_REQ_CLK_FREQ 250000000U
#define OSI_FLOW_CTRL_DISABLE 0U #define OSI_FLOW_CTRL_DISABLE 0U
#define OSI_ADDRESS_32BIT 0 #define OSI_ADDRESS_32BIT 0
#define OSI_ADDRESS_40BIT 1 #define OSI_ADDRESS_40BIT 1
@@ -140,6 +139,7 @@
/** @} */ /** @} */
#endif /* !OSI_STRIPPED_LIB */ #endif /* !OSI_STRIPPED_LIB */
#define OSI_PTP_REQ_CLK_FREQ 250000000U
#define OSI_POLL_COUNT 1000U #define OSI_POLL_COUNT 1000U
#ifndef UINT_MAX #ifndef UINT_MAX
#define UINT_MAX (~0U) #define UINT_MAX (~0U)

View File

@@ -1222,6 +1222,7 @@ nve32_t osi_config_slot_function(struct osi_dma_priv_data *osi_dma,
* @retval -1 on failure. * @retval -1 on failure.
*/ */
nve32_t osi_clear_rx_pkt_err_stats(struct osi_dma_priv_data *osi_dma); 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. * @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. * @retval 0 if ring has outstanding packets.
*/ */
nve32_t osi_txring_empty(struct osi_dma_priv_data *osi_dma, nveu32_t chan); 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. * @brief osi_get_dma - Get pointer to osi_dma data structure.

View File

@@ -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 * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * 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)) #define INCR_TX_DESC_INDEX(idx, x) ((idx) = ((idx) + (1U)) & ((x) - 1U))
/** Increment the rx descriptor index */ /** Increment the rx descriptor index */
#define INCR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) + (1U)) & ((x) - 1U)) #define INCR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) + (1U)) & ((x) - 1U))
#ifdef OSI_DEBUG
/** Decrement the tx descriptor index */ /** Decrement the tx descriptor index */
#define DECR_TX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U)) #define DECR_TX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U))
#endif /* OSI_DEBUG */
#ifndef OSI_STRIPPED_LIB #ifndef OSI_STRIPPED_LIB
/** Decrement the rx descriptor index */ /** Decrement the rx descriptor index */
#define DECR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U)) #define DECR_RX_DESC_INDEX(idx, x) ((idx) = ((idx) - (1U)) & ((x) - 1U))

View File

@@ -2734,6 +2734,11 @@ static nve32_t osi_hal_handle_ioctl(struct osi_core_priv_data *osi_core,
case OSI_CMD_GET_HW_FEAT: case OSI_CMD_GET_HW_FEAT:
ret = ops_p->get_hw_features(osi_core, &data->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; break;
case OSI_CMD_SET_SYSTOHW_TIME: case OSI_CMD_SET_SYSTOHW_TIME:

View File

@@ -1102,6 +1102,7 @@ nve32_t osi_config_slot_function(struct osi_dma_priv_data *osi_dma,
return 0; return 0;
} }
#endif /* !OSI_STRIPPED_LIB */
nve32_t osi_txring_empty(struct osi_dma_priv_data *osi_dma, nveu32_t chan) 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; return (tx_ring->clean_idx == tx_ring->cur_tx_idx) ? 1 : 0;
} }
#endif /* !OSI_STRIPPED_LIB */