Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

OMAPL138 SATA how the pReq -> Retry changed after ATA_SubmitIdentify() function

$
0
0

Everyone:

I use the RTFS system to read and write SATA on the OMAP-L138 board. And I use bios_5_41_13_42, rtfs_1_10_02_32, pspdrivers_01_30_01.

When I do the ATA_DrvInit() , I stucked in the ATA_SubmitIdentify() function:

pReq -> Retry   = 10u;

ATA_SubmitReq (pDevice, pReq);

while (pReq -> Retry != 0)

{

      //PAL_osWaitMsecs (1u);

      m_delay(1u);

      //pReq -> Retry--;

}

I find other codes alike in the ata.c, as following:

static Int32 ATA_MaxLba (ATA_Drive_t *pDevice) 
{ 
  ATA_Dev_Req_t *pReq = NULL; 
  ATA_Dev_Stat_t Status; 
  Int32 retVal = ATA_ERR_GEN; 
 
  if(NULL != pDevice) 
  { 
        retVal = ATA_NO_ERR; 
      pReq = ATA_AllocReq (pDevice, False); 
      if (pReq != NULL) 
      { 
        pReq -> MediaHandle = NULL; 
        pReq -> IsInternal  = True; 
        pReq -> Command . Device = pDevice -> Dev; 
        pReq -> Command . Cmd = ATA_READ_MAX_SECT; 
        pReq -> Buffer = NULL; 
        pReq -> Mode = TASKFILE; 
        pReq -> Res . IsEvent = False; 
        pReq -> Handler = &ATA_IdentHndlr; 
        pReq -> ToHndlr = &ATA_IdentHndlr; 
        pReq -> Timeout = ATA_ONESEC_TO; 
        pReq -> Retry   = 10u; 
 
        ATA_SubmitReq (pDevice, pReq); 
 
        while (pReq -> Retry != 0) 
        { 
          m_delay(1u); 
        } 
 
        Status = pReq->Status; 

So how the value of pReq -> Retry changed? 


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>