From 424f7987df78da2b9522a7aaa9b9f9c8fa9d8327 Mon Sep 17 00:00:00 2001 From: Bibhay Ranjan Date: Fri, 18 Nov 2022 19:42:54 +0530 Subject: [PATCH] nvethernet: Fix the incorrect code in CFLAGS Issue: Few places incorrect CFLAGS are used. OSD based flags cannot be used in OSI Fix: Move the code under correct CFLAGS remove the OSD based codes Note: The OSD based logging need to be reimplemnedted by the macsec module. Bug 3759976 Change-Id: I407b945a24028792f146bc08adf67428612978c3 Signed-off-by: Bibhay Ranjan Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2811917 Reviewed-by: svcacv Reviewed-by: Nagarjuna Kristam Reviewed-by: Bhadram Varka Reviewed-by: Ashutosh Jha GVS: Gerrit_Virtual_Submit --- include/osi_macsec.h | 4 ++-- osi/core/macsec.c | 14 -------------- osi/core/macsec.h | 4 ++-- osi/dma/debug.c | 2 ++ 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/include/osi_macsec.h b/include/osi_macsec.h index 441cc9e..8bb0f86 100644 --- a/include/osi_macsec.h +++ b/include/osi_macsec.h @@ -116,7 +116,7 @@ #define OSI_SA_LUT_MAX_INDEX OSI_TABLE_INDEX_MAX /** @} */ -#ifndef OSI_STRIPPED_LIB +#ifdef DEBUG_MACSEC /** * @addtogroup Debug buffer table CONFIG register helpers macros * @@ -141,7 +141,7 @@ #define OSI_RX_DBG_ICV_ERROR_EVT OSI_BIT(10) #define OSI_RX_DBG_CAPTURE_EVT OSI_BIT(11) /** @} */ -#endif /* !OSI_STRIPPED_LIB */ +#endif /* DEBUG_MACSEC*/ /** * @addtogroup AES ciphers diff --git a/osi/core/macsec.c b/osi/core/macsec.c index 50e7175..1078752 100644 --- a/osi/core/macsec.c +++ b/osi/core/macsec.c @@ -26,21 +26,7 @@ #include "../osi/common/common.h" #include "core_local.h" -#if defined(DEBUG_MACSEC) && defined(QNX_OS) -#define LOG(...) \ - { \ - slogf(0, 6, ##__VA_ARGS__); \ - } - -#elif defined(DEBUG_MACSEC) && defined(LINUX_OS) -#include -#define LOG(...) \ - { \ - pr_debug(__VA_ARGS__); \ - } -#else #define LOG(...) -#endif #ifdef DEBUG_MACSEC /** diff --git a/osi/core/macsec.h b/osi/core/macsec.h index 380413e..95ba892 100644 --- a/osi/core/macsec.h +++ b/osi/core/macsec.h @@ -453,10 +453,10 @@ #define MACSEC_RX_SCI_LUT_PREEMPT_INACTIVE OSI_BIT(9) /** @} */ -#ifndef OSI_STRIPPED_LIB +#ifdef DEBUG_MACSEC /* debug buffer data read/write length */ #define DBG_BUF_LEN 4U -#endif /* !OSI_STRIPPED_LIB */ +#endif /* DEBUG_MACSEC */ #ifdef MACSEC_KEY_PROGRAM #define INTEGER_LEN 4U #endif /* MACSEC_KEY_PROGRAM */ diff --git a/osi/dma/debug.c b/osi/dma/debug.c index 8c29763..fc14ef7 100644 --- a/osi/dma/debug.c +++ b/osi/dma/debug.c @@ -129,7 +129,9 @@ void reg_dump(struct osi_dma_priv_data *osi_dma) max_addr = 0x14EC; break; case OSI_MGBE_MAC_3_10: +#ifndef OSI_STRIPPED_LIB case OSI_MGBE_MAC_4_00: +#endif addr = 0x3100; max_addr = 0x35FC; break;