--- ./source/private_module/bdm/features/white_list/sd_white_list.c	2018-02-09 07:36:26.000000000 +0000
+++ ./source/private_module/bdm/features/white_list/sd_white_list.c.hotpatch	2021-05-07 09:04:12.000000000 +0000
@@ -1342,7 +1342,7 @@
 
     return;
 }
-
+void SdProcSyncEbcResetSwitchPatch(void);
 /**************************************************************************
      : bomlistеĲڸĴϢ
  :                          
@@ -1353,7 +1353,7 @@
 void sdSyncBomListOpDone(BDM_DEV_ACTION_S *action)
 {
     UNREFERENCE_PARAM(action);
-    
+    SdProcSyncEbcResetSwitchPatch();
     (void)sdUpdateBomCheckFlag();
     sdUpdateExtendBomListItem();
 
--- ./source/private_module/bdm/sdm/sd/stub_v3/stub_sd_debug.c	2018-04-02 08:32:38.000000000 +0000
+++ ./source/private_module/bdm/sdm/sd/stub_v3/stub_sd_debug.c.hotpatch	2021-05-07 09:04:12.000000000 +0000
@@ -648,7 +648,7 @@
     DBG_Print("[BDM SD]Success to set efuse check switch %u.\n", skipSwitch);
 
 }
-
+void SioDiagnoseEbcResetSwitchPatch(int32_t argc, char *argv[]);
 /**************************************************************************
 *     :sddebug ѯEfuse 鿪
 * : argc
@@ -659,16 +659,16 @@
 **************************************************************************/
 void sdDoDebugGetEfuseCheckSwitch(int32_t argc, char *argv[])
 {
-    UNREFERENCE_PARAM(argv);
-
-    if ( argc != 2 )
-    {
+    if (argc > 2 && strcmp(argv[2], "ebcresetswitch") == 0) {
+        SioDiagnoseEbcResetSwitchPatch(argc - 3, argv + 3);
+        return;
+    }    
+    if ( argc != 2 ) {
         DBG_Print("[BDM SD]Please check input parame.\n");
         return;
     }
 
     DBG_Print("[BDM SD]Success to get current efuse check switch %u.\n", g_sdEfuseCheckFlag);
-    
     return;
 }
 
--- ./source/private_module/bdm/sdm/sio/dispatch/sio_timeout.c	2018-03-14 11:05:13.000000000 +0000
+++ ./source/private_module/bdm/sdm/sio/dispatch/sio_timeout.c.hotpatch	2021-05-07 09:04:12.000000000 +0000
@@ -1272,7 +1272,7 @@
     sioDispatcherRetry(req, SIO_DELAY_NONE, TRUE);
     return RETURN_OK;
 }
-/*Begin Modified by c00230409 ALMCA2017121819364398 20171231*/
+bool sioJudgeNeedClosePortPatch(SIO_QUEUE_S *queue);
 /**************************************************************************
    : sioJudgeNeedClosePort
      :жǷҪض˿
@@ -1282,7 +1282,8 @@
      : 
 **************************************************************************/
 bool sioJudgeNeedClosePort(SIO_QUEUE_S *queue)
-{   
+{
+#if 0
     if (sioIsPrivateDevWithFC(queue))
     {   
         spin_lock(&queue->dispQLock);
@@ -1304,11 +1305,10 @@
 
         DBG_LogInfo(DBG_LOG_BUTT,"BDM_EH:sio need to close dev(%u) port, flag(%u).",
                     queue->disk->sdevId, queue->queueFlag);
-        
-        return TRUE;
-    }
-
-    return FALSE;
+#endif
+    return sioJudgeNeedClosePortPatch(queue);
+    //}
+    //return FALSE;
 }
 /**************************************************************************
    : sioPrivateDevClosePort
@@ -2100,4 +2100,142 @@
 }
 /* End Modified by m00385535 DTS2017092308140 20171107 */
 
+#define BDM_REQ_FLAG_LATENCY_INSENSITIVE 59
+bool SioIsTimeOutListIoInsensitive(SIO_QUEUE_S *queue)
+{
+    struct list_head *pos = NULL;
+    SIO_S *sio = NULL;
+    REQ_S *req = NULL;
+    bool isInsensitive = TRUE;
+    unsigned long flags = 0;
+    
+    /* ж·IOǷʱӲеIO */
+    spin_lock_irqsave(&queue->timerLock, flags);
+    list_for_each(pos, &queue->timeoutList) {
+        sio = list_entry(pos, SIO_S, node);
+        req = sio->req;
+        if (req == NULL) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req is null, sd id %u queue flag 0x%x.",
+                queue->disk->sdevId, queue->queueFlag);
+            isInsensitive = FALSE;
+            break;
+        }
+        
+        if (!sioTestReqFlag(req, BDM_REQ_FLAG_LATENCY_INSENSITIVE)) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req 0x%p ctrlflag 0x%llx id %llu opcode 0x%x lba %llu len %u is latency sensitive.",
+                req, req->ctrlFlag, req->objectId, req->opCode, req->objectLba, req->length);
+            isInsensitive = FALSE;
+            break;
+        }
+    }
+    spin_unlock_irqrestore(&queue->timerLock, flags);
+
+    return isInsensitive;
+}
+
+bool SioIsDispQueueIoInsensitive(SIO_QUEUE_S *queue)
+{
+    struct list_head *pos = NULL;
+    SIO_S *sio = NULL;
+    REQ_S *req = NULL;
+    bool isInsensitive = TRUE;
+
+    /* ˽вIOȼַУ˲ҪhighQueueHeadַ */
+    spin_lock(&queue->dispQLock);
+    list_for_each(pos, &queue->queueHead) {
+        sio = list_entry(pos, SIO_S, node);
+        req = sio->req;
+        if (req == NULL) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req is null, sd id %u queue flag 0x%x.",
+                queue->disk->sdevId, queue->queueFlag);
+            isInsensitive = FALSE;
+            break;
+        }
+
+        if (!sioTestReqFlag(req, BDM_REQ_FLAG_LATENCY_INSENSITIVE)) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req 0x%p ctrlflag 0x%llx id %llu opcode 0x%x lba %llu len %u is latency sensitive.",
+                req, req->ctrlFlag, req->objectId, req->opCode, req->objectLba, req->length);
+            isInsensitive = FALSE;
+            break;
+        }
+    }
+    spin_unlock(&queue->dispQLock);
+
+    return isInsensitive;
+}
+
+bool SioIsEhListIoInsensitive(SIO_QUEUE_S *queue)
+{
+    struct list_head *pos = NULL;
+    SIO_S *sio = NULL;
+    REQ_S *req = NULL;
+    bool isInsensitive = TRUE;
+
+    spin_lock(&queue->dispQLock);
+    list_for_each(pos, &queue->ehSioList) {
+        sio = list_entry(pos, SIO_S, node);
+        req = sio->req;
+        if (req == NULL) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req is null, sd id %u queue flag 0x%x.",
+                queue->disk->sdevId, queue->queueFlag);
+            isInsensitive = FALSE;
+            break;
+        }
+
+        if (!sioTestReqFlag(req, BDM_REQ_FLAG_LATENCY_INSENSITIVE)) {
+            BDM_PRINT_LIMIT(BDM_LOG_INTERVAL_ONE_MIN, 2, DBG_LOG_ERROR, 0, 
+                "SPH033: Req 0x%p ctrlflag 0x%llx id %llu opcode 0x%x lba %llu len %u is latency sensitive.",
+                req, req->ctrlFlag, req->objectId, req->opCode, req->objectLba, req->length);
+            isInsensitive = FALSE;
+            break;
+        }
+    }
+    spin_unlock(&queue->dispQLock);
+
+    return isInsensitive;
+}
+
+bool IsSdEbcResetSwitchOpen(void);
+bool sioJudgeNeedClosePortPatch(SIO_QUEUE_S *queue)
+{   
+    if (!sioIsPrivateDevWithFC(queue))
+    {
+        return FALSE;
+    }
+    
+    if (IsSdEbcResetSwitchOpen()) {
+        if (SioIsEhListIoInsensitive(queue) &&
+            SioIsTimeOutListIoInsensitive(queue) &&
+            SioIsDispQueueIoInsensitive(queue)) {
+            return FALSE;
+        }
+    }
+    
+    spin_lock(&queue->dispQLock);
+    if (sioTestQueueFlag(queue, SIO_QUEUE_FLAG_FRI_DEV_IS_DOING_CLOSE_PORT)
+        || sioTestQueueFlag(queue, SIO_QUEUE_FLAG_FRI_DEV_CLOSE_PORT_SUCCESS)
+        || sioTestQueueFlag(queue, SIO_QUEUE_FLAG_FRI_DEV_CLOSE_PORT_FAIL))
+    {   
+        spin_unlock(&queue->dispQLock);
+        return FALSE;
+    }
+
+    sioSetQueueFlag(queue, SIO_QUEUE_FLAG_FRI_DEV_IS_DOING_CLOSE_PORT);
+    if (!sioTestQueueFlag(queue, SIO_QUEUE_FLAG_RECOVERY))
+    {
+        sioSetQueueFlag(queue, SIO_QUEUE_FLAG_RECOVERY);
+        sioBlockQueue(queue);
+    }
+    spin_unlock(&queue->dispQLock);
+
+    DBG_LogInfo(0,"BDM_EH:SPH033: sio need to close dev(%u) port, flag(%u).",
+                queue->disk->sdevId, queue->queueFlag);
+    
+    return TRUE;
+}
 
--- ./source/private_module/bdm/sdm/sio/sio_debug.c	2018-04-09 07:08:00.000000000 +0000
+++ ./source/private_module/bdm/sdm/sio/sio_debug.c.hotpatch	2021-05-07 09:04:12.000000000 +0000
@@ -3414,7 +3414,8 @@
     g_stSioShow.pfnHelp();
     return;
 }
-
+void SioCliEbcResetSwitchPatch(int32_t argc, char *argv[]);
+void sioStatCliShowAllOrigin(int32_t argc, char *argv[]);
 /**************************************************************************
    : sioStatCliShowAll
      : ʾϢ
@@ -3422,16 +3423,15 @@
  : 
    ֵ: 
      : 
-
 **************************************************************************/
 static void sioStatCliShowAll(int32_t argc, char *argv[])
 {
-    SIO_QUEUE_S *queue = NULL; 
+     
     int32_t varNum = argc - 1;
-    int32_t ret;
-    BDM_DBG_OPT_S opt;
-    uint32_t sdId = 0; 
-    SIO_IOSTAT_S *ioStat = NULL;
+    
+    
+     
+    
     SIO_DEBUG_CMD_S*pstCmd = NULL;
 
     if(varNum <= 0)
@@ -3442,83 +3442,83 @@
         DBG_Print("        %s\n", pstCmd->cmdHelp);
         return;   
     }
-    
-    while(varNum > 0)
-    {
-		/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
-        ret = BDM_DBG_GetCliOpt(argv[(int64_t)argc - varNum], &opt);
-		/*End Modified by liantao00245290 DTS2014111810841  20141119*/
-        if (RETURN_OK != ret)
-        {
-			/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
-            DBG_Print("Parameter %s is incorrect.\n", argv[(int64_t)argc - varNum]);
-			/*End Modified by liantao00245290 DTS2014111810841  20141119*/
-            DBG_Print("Usage:\n");
-            pstCmd = &g_sioDebugCliShowCmd[0];
-            DBG_Print("        %s\n", pstCmd->cmdHelp);
-            return;
-        }
-        if(0 == strcmp(opt.varName, "sdid"))
-        {
-            sdId = (uint32_t)LVOS_StrToS64(opt.varValue);
-        }
-        else 
-        {
-			/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
-            DBG_Print("Parameter %s is incorrect.\n", argv[(int64_t)argc - varNum]);
-			/*End Modified by liantao00245290 DTS2014111810841  20141119*/
-            DBG_Print("Usage:\n");
-            pstCmd = &g_sioDebugCliShowCmd[0];
-            DBG_Print("        %s\n", pstCmd->cmdHelp);
-            return;
-        }
 
-        varNum--;
+    if (strcmp(argv[1], "ebcresetswitch") == 0) {
+        SioCliEbcResetSwitchPatch(argc - 2, argv + 2);
+    } else {
+        sioStatCliShowAllOrigin(argc, argv);
     }
 
-    queue = sioGetQueueByDeviceId(sdId);
-	
-    if(NULL == queue)
-    {
-        DBG_Print("Cannot find out dev.\n");
-        return;
-    }
-    ioStat = SIO_GET_QUEUE_IOSTAT(queue);
-	
-	DBG_Print("sdId             : %d\n", queue->disk->sdevId);
-	DBG_Print("queue            : 0x%p\n", queue);
-    
-    DBG_Print("sioBusy          : %d\n", atomic_read(&ioStat->sioBusy));
-    DBG_Print("sioDoneCnt       : %lld\n", atomic64_read(&ioStat->sioDoneCnt));
-    DBG_Print("sioErrCnt        : %lld\n", atomic64_read(&ioStat->sioErrCnt));
-    
-    DBG_Print("schBusy          : %d\n", ioStat->schBusy);
-    DBG_Print("read schRevCnt   : %lld\n", ioStat->schRevCnt[0]);
-    DBG_Print("write schRevCnt  : %lld\n", ioStat->schRevCnt[1]);
-    DBG_Print("read ftMergeCnt  : %lld\n", ioStat->ftMergeCnt[0]);
-    DBG_Print("write ftMergeCnt : %lld\n", ioStat->ftMergeCnt[1]);
-    DBG_Print("read bkMergeCnt  : %lld\n", ioStat->bkMergeCnt[0]);
-    DBG_Print("write bkMergeCnt : %lld\n", ioStat->bkMergeCnt[1]);
-    DBG_Print("read biMergeCnt  : %lld\n", ioStat->biMergeCnt[0]);
-    DBG_Print("write biMergeCnt : %lld\n", ioStat->biMergeCnt[1]);
+    return;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-    DBG_Print("timerUnplug      : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_TIMER]);
-    DBG_Print("ioUnplug         : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_IO_RETURN]);
-    DBG_Print("blockUnplug      : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_UNBLOCK]);
-    
-/* Dorado 5000 modified begin */
-    DBG_Print("dispBusy         : %d\n", (uint32_t)sioGetDiskStaticInfo(queue));
-/* Dorado 5000 modified end */
-    DBG_Print("devBusy          : %d\n", atomic_read(&ioStat->devBusy));
 
-    DBG_Print("devDoneCnt       : %ld\n", atomic64_read(&ioStat->devDoneCnt));
-    DBG_Print("devErrCnt        : %ld\n", atomic64_read(&ioStat->devErrCnt));
-    DBG_Print("devTimeout       : %ld\n", atomic64_read(&ioStat->devTimeoutCnt));
 
-    DBG_Print("maxSingleDisp    : %d\n", ioStat->maxSingleDisp);
 
-    DBG_Print("adjust RevCnt    : %ld\n", atomic64_read(&ioStat->adjustRevCnt));
-    DBG_Print("adjust child Cnt : %ld\n", atomic64_read(&ioStat->adjustCnt));
 }
 /**************************************************************************
   : sioStatCliShowDevIostat
@@ -6201,3 +6201,244 @@
     return;
 }
 
+#include "ld_controller.h"
+
+bool g_ebcResetSwitch = FALSE;
+bool IsSdEbcResetSwitchOpen(void)
+{
+    return g_ebcResetSwitch;
+}
+
+void SdProcSyncEbcResetSwitchPatch(void)
+{
+    bool resetSwitch = FALSE;
+    CST_ITEM_T item;
+
+    memset(&item, 0, sizeof(item));
+
+    /* ĬΪأ0ʾ0ʾأĬֵ */
+    if (CST_GetItem("PERFORMANCE_DEFAULT", "DmpMaxSendToPeerSectorNum", &item)) {
+        resetSwitch = LVOS_StrToU64(item.acValue) > 0 ? false : true;
+        if (resetSwitch == g_ebcResetSwitch) {
+            DBG_LogInfo(0, "SPH033: Current switch is %s, no need to update.", 
+                g_ebcResetSwitch ? "OPEN" : "CLOSE");
+        } else {
+            DBG_LogInfo(0, "SPH033: Update switch from %s to %s.", 
+                g_ebcResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            g_ebcResetSwitch = resetSwitch;
+        }
+    } else {
+        DBG_LogInfo(0, "SPH033: Update switch failed!");
+    }
+
+    return;
+}
+
+void SioUpdateEbcResetSwitchPatch(void)
+{
+    bool resetSwitch = FALSE;
+    CST_ITEM_T item;
+
+    memset(&item, 0, sizeof(item));
+
+    /* ĬΪأ0ʾ0ʾأĬֵ */
+    if (CST_GetItem("PERFORMANCE_DEFAULT", "DmpMaxSendToPeerSectorNum", &item)) {
+        resetSwitch = LVOS_StrToU64(item.acValue) > 0 ? FALSE : TRUE;
+        if (resetSwitch == g_ebcResetSwitch) {
+            DBG_Print("Current switch is %s, no need to update.\n", 
+                g_ebcResetSwitch ? "OPEN" : "CLOSE");
+        } else {
+            DBG_Print("Update switch from %s to %s.\n", 
+                g_ebcResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            DBG_LogInfo(0, "SPH033: Update switch from %s to %s.", 
+                g_ebcResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            g_ebcResetSwitch = resetSwitch;
+        }
+    } else {
+        DBG_Print("Update switch failed!\n");
+    }
+
+    return;
+}
+
+OSP_S32 ECONF_ModifyConfig(OSP_CHAR *v_szSectionName, OSP_CHAR *v_szItemName, OSP_CHAR *v_szItemValue);
+void sdSyncBomListOp(void);
+void SioSetEbcResetSwitchPatch(const char *valArg)
+{
+    bool resetSwitch = FALSE;
+    bool prevResetSwitch = g_ebcResetSwitch;
+
+    if (!ldIsMasterController()) {
+        DBG_Print("Please execute on master controller.\n");
+        return;
+    }
+
+    resetSwitch = LVOS_StrToU64(valArg) > 0 ? TRUE : FALSE;
+    if (resetSwitch == prevResetSwitch) {
+        DBG_Print("Current switch is %s, no need to change.\n", 
+            prevResetSwitch ? "OPEN" : "CLOSE");
+    } else {
+        if (ECONF_ModifyConfig("PERFORMANCE_DEFAULT", "DmpMaxSendToPeerSectorNum", 
+            resetSwitch ? "0" : "61072") != RETURN_OK) {
+            DBG_Print("Modify switch from %s to %s failed!\n", 
+                prevResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            DBG_LogInfo(0, "SPH033: Modify switch from %s to %s failed!",
+                prevResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+        } else {
+            sdSyncBomListOp();
+            DBG_Print("Modify switch from %s to %s success.\n", 
+                prevResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            DBG_LogInfo(0, "SPH033: Modify switch from %s to %s success.",
+                prevResetSwitch ? "OPEN" : "CLOSE",
+                resetSwitch ? "OPEN" : "CLOSE");
+            g_ebcResetSwitch = resetSwitch;
+        }
+    }
+
+    return;
+}
+
+void SioResetEbcResetSwitchPatch(void)
+{
+    if (ECONF_ModifyConfig("PERFORMANCE_DEFAULT", "DmpMaxSendToPeerSectorNum", "61072") != RETURN_OK) {
+        DBG_Print("Restore switch configure failed!\n");
+        DBG_LogInfo(0, "SPH033: Restore switch configure failed!");
+        return;
+    }
+
+    g_ebcResetSwitch = FALSE;
+    DBG_Print("Restore switch configure success.\n");
+    DBG_LogInfo(0, "SPH033: Restore switch configure success.");
+    return;
+}
+
+void SioCliEbcResetSwitchPatch(int32_t argc, char *argv[])
+{
+    if ((argc == 1) && (strcmp(argv[0], "show") == 0)) {
+        DBG_Print("The switch is %s.\n", g_ebcResetSwitch ? "OPEN" : "CLOSE");
+        return;   
+    } else if ((argc == 1) && (strcmp(argv[0], "reload") == 0)) {
+        SioUpdateEbcResetSwitchPatch();
+    } else if ((argc == 2) && (strcmp(argv[0], "set") == 0)) {
+        SioSetEbcResetSwitchPatch(argv[1]);
+    }
+
+    return;
+}
+
+void sioStatCliShowAllOrigin(int32_t argc, char *argv[])
+{
+    SIO_QUEUE_S *queue = NULL; 
+    int32_t varNum = argc - 1;
+    int32_t ret;
+    BDM_DBG_OPT_S opt;
+    uint32_t sdId = 0; 
+    SIO_IOSTAT_S *ioStat = NULL;
+    SIO_DEBUG_CMD_S*pstCmd = NULL;
+
+    if(varNum <= 0)
+    {   
+        DBG_Print("The number of parameters is incorrect.\n");
+        DBG_Print("Usage:\n");
+        pstCmd = &g_sioDebugCliShowCmd[0];
+        DBG_Print("        %s\n", pstCmd->cmdHelp);
+        return;   
+    }
+    
+    while(varNum > 0)
+    {
+		/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
+        ret = BDM_DBG_GetCliOpt(argv[(int64_t)argc - varNum], &opt);
+		/*End Modified by liantao00245290 DTS2014111810841  20141119*/
+        if (RETURN_OK != ret)
+        {
+			/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
+            DBG_Print("Parameter %s is incorrect.\n", argv[(int64_t)argc - varNum]);
+			/*End Modified by liantao00245290 DTS2014111810841  20141119*/
+            DBG_Print("Usage:\n");
+            pstCmd = &g_sioDebugCliShowCmd[0];
+            DBG_Print("        %s\n", pstCmd->cmdHelp);
+            return;
+        }
+        if(0 == strcmp(opt.varName, "sdid"))
+        {
+            sdId = (uint32_t)LVOS_StrToS64(opt.varValue);
+        }
+        else 
+        {
+			/*Begin Modified by liantao00245290 DTS2014111810841  20141119*/
+            DBG_Print("Parameter %s is incorrect.\n", argv[(int64_t)argc - varNum]);
+			/*End Modified by liantao00245290 DTS2014111810841  20141119*/
+            DBG_Print("Usage:\n");
+            pstCmd = &g_sioDebugCliShowCmd[0];
+            DBG_Print("        %s\n", pstCmd->cmdHelp);
+            return;
+        }
+
+        varNum--;
+    }
+
+    queue = sioGetQueueByDeviceId(sdId);
+	
+    if(NULL == queue)
+    {
+        DBG_Print("Cannot find out dev.\n");
+        return;
+    }
+    ioStat = SIO_GET_QUEUE_IOSTAT(queue);
+	
+	DBG_Print("sdId             : %d\n", queue->disk->sdevId);
+	DBG_Print("queue            : 0x%p\n", queue);
+    
+    DBG_Print("sioBusy          : %d\n", atomic_read(&ioStat->sioBusy));
+    DBG_Print("sioDoneCnt       : %lld\n", atomic64_read(&ioStat->sioDoneCnt));
+    DBG_Print("sioErrCnt        : %lld\n", atomic64_read(&ioStat->sioErrCnt));
+    
+    DBG_Print("schBusy          : %d\n", ioStat->schBusy);
+    DBG_Print("read schRevCnt   : %lld\n", ioStat->schRevCnt[0]);
+    DBG_Print("write schRevCnt  : %lld\n", ioStat->schRevCnt[1]);
+    DBG_Print("read ftMergeCnt  : %lld\n", ioStat->ftMergeCnt[0]);
+    DBG_Print("write ftMergeCnt : %lld\n", ioStat->ftMergeCnt[1]);
+    DBG_Print("read bkMergeCnt  : %lld\n", ioStat->bkMergeCnt[0]);
+    DBG_Print("write bkMergeCnt : %lld\n", ioStat->bkMergeCnt[1]);
+    DBG_Print("read biMergeCnt  : %lld\n", ioStat->biMergeCnt[0]);
+    DBG_Print("write biMergeCnt : %lld\n", ioStat->biMergeCnt[1]);
+
+    DBG_Print("timerUnplug      : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_TIMER]);
+    DBG_Print("ioUnplug         : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_IO_RETURN]);
+    DBG_Print("blockUnplug      : %lld\n", ioStat->unplugCnt[SIO_UNPLUG_UNBLOCK]);
+    
+/* Dorado 5000 modified begin */
+    DBG_Print("dispBusy         : %d\n", (uint32_t)sioGetDiskStaticInfo(queue));
+/* Dorado 5000 modified end */
+    DBG_Print("devBusy          : %d\n", atomic_read(&ioStat->devBusy));
+
+    DBG_Print("devDoneCnt       : %ld\n", atomic64_read(&ioStat->devDoneCnt));
+    DBG_Print("devErrCnt        : %ld\n", atomic64_read(&ioStat->devErrCnt));
+    DBG_Print("devTimeout       : %ld\n", atomic64_read(&ioStat->devTimeoutCnt));
+
+    DBG_Print("maxSingleDisp    : %d\n", ioStat->maxSingleDisp);
+
+    DBG_Print("adjust RevCnt    : %ld\n", atomic64_read(&ioStat->adjustRevCnt));
+    DBG_Print("adjust child Cnt : %ld\n", atomic64_read(&ioStat->adjustCnt));
+}
+
+void SioDiagnoseEbcResetSwitchPatch(int32_t argc, char *argv[])
+{
+    if ((argc == 1) && (strcmp(argv[0], "restore") == 0)) {
+        SioResetEbcResetSwitchPatch();
+    } else if ((argc == 1) && (strcmp(argv[0], "reload") == 0)) {
+        SioUpdateEbcResetSwitchPatch();
+    } else {
+        DBG_Print("[BDM SD]Please check input parame.\n");
+    }
+
+    return;
+}
+
