+
+ pending_flag = (host->complete_done > 0) && (host->retryfunc<50) \
+ && (rk29_sdmmc_test_pending(host, EVENT_CMD_COMPLETE)|| rk29_sdmmc_test_pending(host, EVENT_DATA_COMPLETE) );
+ if(pending_flag)
+ {
+ xbwprintk(7, "%s..%d... cmd=%d(arg=0x%x),completedone=%d, retrycount=%d, doneflag=%d, \n \
+ host->state=0x%x, switchstate=%x, \n \
+ pendingEvent=0x%lu, completeEvents=0x%lu, \n \
+ mrqCMD=%d, arg=0x%x \n ====xbw[%s]====\n",\
+
+ __FUNCTION__, __LINE__,host->cmd->opcode, host->cmd->arg, host->complete_done,\
+ host->retryfunc, host->mmc->doneflag,host->state, state, \
+ host->pending_events,host->completed_events,\
+ host->mrq->cmd->opcode, host->mrq->cmd->arg, host->dma_name);
+
+ cpu_relax();
+ }
+
+ } while(pending_flag && ++host->retryfunc); //while(0);
+
+ if(0!=stopflag)
+ {
+ if(host->cmd->error)
+ xbwprintk(3,"%d: call send_stop_cmd== %d, completedone=%d, doneflag=%d, hoststate=%x, statusReg=0x%x \n", \
+ __LINE__,stopflag, host->complete_done, host->mmc->doneflag, state, rk29_sdmmc_read(host->regs, SDMMC_STATUS));
+
+ state = STATE_SENDING_CMD;
+ send_stop_cmd(host); //Moidfyed by xbw at 2011-09-08
+ }