--- ./source/private_module/SRC/msc/msc_debug.c	2020-11-10 04:01:36.578501375 +0000
+++ ./source/private_module/SRC/msc/msc_debug.c.hotpatch	2021-05-20 11:47:24.894501375 +0000
@@ -5643,7 +5643,176 @@
 
     return Ret;
 }
+extern OSP_U32 g_SfpForFcTxPowerLowThres;
+OSP_VOID MSC_SetSfpTxPowerLowThres(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    OSP_U32 TxPowerLowThres = 0;
+    
+    if (Argc != 3)
+    {
+        DBG_PrintBuf("Usage: msc setsfptxpowerlowthres [lowthres]\n"
+                     "      (eg:msc setsfptxpowerlowthres 500)\n");
 
+        return;
+    }
+
+    TxPowerLowThres = (OSP_U32)LVOS_StrToU64(Argv[2]);
+    g_SfpForFcTxPowerLowThres = TxPowerLowThres;
+    DBG_PrintBuf("Command executed successfully.\n");
+    return;
+}
+OSP_VOID MSC_GetSfpTxPowerLowThres(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    REFERNCE_VAR(Argv);
+    if (Argc != 2)
+    {
+        DBG_PrintBuf("Usage: msc getsfptxpowerlowthres\n"
+                     "      (eg:msc getsfptxpowerlowthres)\n");
+
+        return;
+    }
+    DBG_PrintBuf("fcLowTxPower      : %d\n", g_SfpForFcTxPowerLowThres);
+    DBG_PrintBuf("Command executed successfully.\n");
+    return;
+}
+OSP_VOID MSC_SetFcPortErrorCodeRule(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    OSP_S32 Result = RETURN_ERROR;
+    DMI_PORT_ERROR_CODE_S ErrorCodeRule = {0};
+    if (Argc != 5)
+    {
+        DBG_PrintBuf("Usage: msc setfcporterrorcoderule\n"
+                     "      (eg:msc setsfptxpowerlowthres checkperiod checkthreshold checktime)\n");
+        return;
+    }
+    ErrorCodeRule.PortType = DRV_PROTOCOL_TYPE_FC;
+    ErrorCodeRule.CheckPeriod = (OSP_U32)LVOS_StrToU64(Argv[2]);
+    ErrorCodeRule.CheckThreshold = (OSP_U32)LVOS_StrToU64(Argv[3]);
+    ErrorCodeRule.CheckTime = (OSP_U32)LVOS_StrToU64(Argv[4]);
+
+    
+    Result = OperatePort(SET_ERROR_CODE_RULE, (OSP_U64)0, 0, DRV_PROTOCOL_TYPE_FC, &ErrorCodeRule, sizeof(DMI_PORT_ERROR_CODE_S));
+    if (RETURN_OK == Result)
+    {
+        DBG_PrintBuf("Command executed successfully.\n");
+    }
+    else
+    {
+        DBG_PrintBuf("Command executed unsuccessfully.\n");
+    }
+    return;
+}
+OSP_VOID MSC_GetFcPortErrorCodeRule(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    OSP_S32 Result = RETURN_ERROR;
+    DMI_PORT_ERROR_CODE_S ErrorCodeRule = {0};
+    REFERNCE_VAR(Argv);
+    if (Argc != 2)
+    {
+        DBG_PrintBuf("Usage: msc getfcporterrorcoderule \n"
+                     "      (eg:msc getsfptxpowerlowthres)\n");
+
+        return;
+    }
+    ErrorCodeRule.PortType = DRV_PROTOCOL_TYPE_FC;
+    Result = OperatePort(GET_ERROR_CODE_RULE, (OSP_U64)0, 0, DRV_PROTOCOL_TYPE_FC, &ErrorCodeRule, sizeof(DMI_PORT_ERROR_CODE_S));
+    if (RETURN_OK == Result)
+    {
+        DBG_PrintBuf("fcCheckPeriod     : %d\n", ErrorCodeRule.CheckPeriod);
+        DBG_PrintBuf("fcCheckThreshold  : %d\n", ErrorCodeRule.CheckThreshold);
+        DBG_PrintBuf("fcCheckTimes      : %d\n", ErrorCodeRule.CheckTime);
+        DBG_PrintBuf("Command executed successfully.\n");
+    }
+    else
+    {
+        DBG_PrintBuf("fcCheckPeriod     : %d\n", ErrorCodeRule.CheckPeriod);
+        DBG_PrintBuf("fcCheckThreshold  : %d\n", ErrorCodeRule.CheckThreshold);
+        DBG_PrintBuf("fcCheckTimes      : %d\n", ErrorCodeRule.CheckTime);
+        DBG_PrintBuf("Command executed unsuccessfully.\n");
+    }
+    return;
+}
+
+OSP_VOID MSC_SetEthPortErrorCodeRule(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    OSP_S32 Result = RETURN_ERROR;
+    DMI_PORT_ERROR_CODE_S ErrorCodeRule = {0};
+    if (Argc != 5)
+    {
+        DBG_PrintBuf("Usage: msc setethporterrorcoderule\n"
+                     "      (eg:msc setethporterrorcoderule checkperiod checkthreshold checktime)\n");
+        return;
+    }
+    ErrorCodeRule.PortType = DRV_PROTOCOL_TYPE_ETH;
+    ErrorCodeRule.CheckPeriod = (OSP_U32)LVOS_StrToU64(Argv[2]);
+    ErrorCodeRule.CheckThreshold = (OSP_U32)LVOS_StrToU64(Argv[3]);
+    ErrorCodeRule.CheckTime = (OSP_U32)LVOS_StrToU64(Argv[4]);
+
+    
+    Result = OperatePort(SET_ERROR_CODE_RULE, (OSP_U64)0, 0, DRV_PROTOCOL_TYPE_ETH, &ErrorCodeRule, sizeof(DMI_PORT_ERROR_CODE_S));
+    if (RETURN_OK == Result)
+    {
+        DBG_PrintBuf("Command executed successfully.\n");
+    }
+    else
+    {
+        DBG_PrintBuf("Command executed unsuccessfully.\n");
+    }
+    return;
+}
+OSP_VOID MSC_GetEthPortErrorCodeRule(OSP_S32 Argc, OSP_CHAR *Argv[])
+{
+    OSP_S32 Result = RETURN_ERROR;
+    DMI_PORT_ERROR_CODE_S ErrorCodeRule = {0};
+    REFERNCE_VAR(Argv);
+    if (Argc != 2)
+    {
+        DBG_PrintBuf("Usage: msc getethporterrorcoderule\n"
+                     "      (eg:msc getethporterrorcoderule)\n");
+
+        return;
+    }
+    ErrorCodeRule.PortType = DRV_PROTOCOL_TYPE_ETH;
+    Result = OperatePort(GET_ERROR_CODE_RULE, (OSP_U64)0, 0, DRV_PROTOCOL_TYPE_ETH, &ErrorCodeRule, sizeof(DMI_PORT_ERROR_CODE_S));
+    if (RETURN_OK == Result)
+    {
+        DBG_PrintBuf("ethCheckPeriod     : %d\n", ErrorCodeRule.CheckPeriod);
+        DBG_PrintBuf("ethCheckThreshold  : %d\n", ErrorCodeRule.CheckThreshold);
+        DBG_PrintBuf("ethCheckTimes      : %d\n", ErrorCodeRule.CheckTime);
+        DBG_PrintBuf("Command executed successfully.\n");
+    }
+    else
+    {
+        DBG_PrintBuf("ethCheckPeriod     : %d\n", ErrorCodeRule.CheckPeriod);
+        DBG_PrintBuf("ethCheckThreshold  : %d\n", ErrorCodeRule.CheckThreshold);
+        DBG_PrintBuf("ethCheckTimes      : %d\n", ErrorCodeRule.CheckTime);
+        DBG_PrintBuf("Command executed unsuccessfully.\n");
+    }
+    return;
+}
+DMI_DEBUG_CMD_S g_MscDebugCmdTable_Hotpatch033[] =
+{
+    {"nodeinfo", MSC_ShowNodeInfo},
+    {"cpuinfo", MSC_ShowCpuInfo},
+    {"dimminfo", MSC_ShowDIMMInfo},
+    {"bbuinfo", MSC_ShowBbuInfo},
+    {"intfinfo", MSC_ShowIntfInfo},
+    {"portcfgdb", MSC_ShowPortCfgDB},
+    {"showbondport", MSC_ShowBondPort},
+    {"showsnap", MSC_ShowSnapInfo},
+    {"vlaninfo", MSC_ShowVlanInfo},
+    {"lifinfo",  MSC_ShowLifInfo},
+    {"faninfo", MSC_ShowFanInfo},
+    {"powerinfo", MSC_ShowPowerInfo},
+    {"ctrlinfo", MSC_ShowCtrlBoardInfo},
+    {"setsfptxpowerlowthres", MSC_SetSfpTxPowerLowThres},
+    {"getsfptxpowerlowthres", MSC_GetSfpTxPowerLowThres},
+    {"setfcporterrorcoderule", MSC_SetFcPortErrorCodeRule},
+    {"getfcporterrorcoderule", MSC_GetFcPortErrorCodeRule},
+    {"setethporterrorcoderule", MSC_SetEthPortErrorCodeRule},
+    {"getethporterrorcoderule", MSC_GetEthPortErrorCodeRule},
+};
+OSP_U32 array_count033 = sizeof(g_MscDebugCmdTable_Hotpatch033) / sizeof(DMI_DEBUG_CMD_S);
 #ifdef __cplusplus
 }
 #endif
--- ./source/private_module/SRC/common/debug.c	2020-11-10 04:01:36.742501375 +0000
+++ ./source/private_module/SRC/common/debug.c.hotpatch	2021-05-20 11:47:24.894501375 +0000
@@ -91,18 +91,9 @@
 /*****************************************************************************
      : DMI_DoDebugCmd
    : diagnoseִ
-   : CMD_TYPE_E Type
-             OSP_S32 Argc
-             OSP_CHAR *Argv[]
-   : 
-   ֵ  : OSP_VOID
-
- ޸ʷ      :
-  1.       : 20131019
-           : d90003911
-    ޸   : ɺ
-
 *****************************************************************************/
+extern DMI_DEBUG_CMD_S g_MscDebugCmdTable_Hotpatch033[];
+extern OSP_U32 array_count033;
 OSP_VOID DMI_DoDebugCmd(CMD_TYPE_E Type, OSP_S32 Argc, OSP_CHAR *Argv[])
 {
     OSP_U32 Index = 0;
@@ -115,7 +106,16 @@
         DBG_ShowUsageAndErrMsg(NULL);
         return ;
     }
-
+    if (Type == CMD_MSC ) {
+        for (Index = 0; Index < array_count033; Index++) {
+            if( 0 == OSAL_StrNCmp(g_MscDebugCmdTable_Hotpatch033[Index].Cmd, Argv[1], DMI_DEBUG_CMD_LEN) ) {
+                if(NULL != g_MscDebugCmdTable_Hotpatch033[Index].DebugCmdFunc) {
+                    g_MscDebugCmdTable_Hotpatch033[Index].DebugCmdFunc(Argc, Argv);
+                    return;
+                }
+            }
+        }
+    }
     DplCmdCnt = sizeof(g_DebugCmdTable[Type])/sizeof(DMI_DEBUG_CMD_S);
 
     for (Index = 0; Index < DplCmdCnt; Index++)
--- ./source/private_module/SRC/dpl/device/sfp.c	2020-11-10 04:01:35.874501375 +0000
+++ ./source/private_module/SRC/dpl/device/sfp.c.hotpatch	2021-05-20 11:47:24.898501375 +0000
@@ -1137,23 +1137,23 @@
     return ChgCnt;
 }
 
-
-
+OSP_U32 g_SfpForFcTxPowerLowThres = 0;
+OSP_U32 DPL_GetSfpPowerLowThres(SFP_PORT_INFO_S *sfp)
+{
+        /* FC˿ڹģʹòƷ·ͷ͹ */
+        if (sfp->PhyInfo.Base.Info.Protocol == DRV_PROTOCOL_TYPE_FC) {
+                /* ûûʱƷĬ·0ʹ */
+            if (g_SfpForFcTxPowerLowThres != 0) {
+                return g_SfpForFcTxPowerLowThres * 10;
+            }
+        }
+        /* Ĭʹó */
+        return sfp->PhyInfo.Ext.Info.Detail.TxPowerLowThres;
+}
 /*****************************************************************************
      : DPL_CheckSfpTxPower
    : жϹģ鷢͹Ƿи澯
-   : SFP_PORT_INFO_S *Sfp
-   : OSP_U64* SetFaultBitMask
-             OSP_U64 *ClrFaultBitMask
-   ֵ  : OSP_VOID
-
- ޸ʷ      :
-  1.       : 2015625
-           : l90006162
-    ޸   : ɺ
-  2.       : 201738
-           : m00406333
-    ޸   : DTS2017030801620
+
 
 *****************************************************************************/
 OSP_U32 DPL_CheckSfpTxPower(SFP_PORT_INFO_S *Sfp,
@@ -1178,7 +1178,7 @@
     }
 
     TxPowerHigh = Sfp->PhyInfo.Ext.Info.Detail.TxPowerHighThres;
-    TxPowerLow = Sfp->PhyInfo.Ext.Info.Detail.TxPowerLowThres;
+    TxPowerLow =DPL_GetSfpPowerLowThres(Sfp);
 
     if ((B_FALSE == IsValidValue(TxPowerHigh)) && (B_FALSE == IsValidValue(TxPowerLow)))
     {
