none
Recent change to CETK Storage Device Block Driver Read/Write test now 2003 fails on FMD RRS feed

  • Question

  • I recently updated CE6 with the latest QFEs and apparently, one of the changes was to CETK Storage Device Block Driver Read/Write test 2003.  It used to test with four buffers of 1KB each:  

    *** Test Name:      Buffer Sizes: 1024, 1024, 1024, 1024

     Now it tests four buffers of different sizes:   

    *** Test Name:      Buffer Sizes: (1X, 2X, 4x, 8x) Sector Size

       BEGIN TEST: "Buffer Sizes: (1X, 2X, 4x, 8x) Sector Size", Threads=1, Seed=31911
          opened user-specified mass storage device: "DSK1:"
              Total Sectors: 257542
              Bytes Per Sector: 512
              Cylinders: 1
              Heads: 1
              Sectors: 1
              Flags: 0x00000008
          Opened DSK1:, hDsk=0x00851203.
          DISK INFORMATION FROM IOCTL
          ...Total sectors:.......(257542)
          ...Bytes Per Sector:....(512)
          ...Cylinders:...........(1)
          ...Heads:...............(1)
          ...Sectors:.............(1)
          ...Total Bytes:.........(131861504)
          ...Flags:...............(0x00000008)
          pSGReq: 0x240235C0
          sglist[0]: 1024 bytes @ 0x24023BA0
          Filling: 256
          sglist[1]: 2048 bytes @ 0x240245A0
          Filling: 512
          sglist[2]: 4096 bytes @ 0x24024DA0
          Filling: 1024
          sglist[3]: 8192 bytes @ 0x24025DA0
          Filling: 2048
          Number of sectors to read: 30
          Buffer 0: 1024 bytes, 0x24023BA0 - 0x24023F9F.
          Buffer 1: 2048 bytes, 0x240245A0 - 0x24024D9F.
          Buffer 2: 4096 bytes, 0x24024DA0 - 0x24025D9F.
          Buffer 3: 8192 bytes, 0x24025DA0 - 0x24027D9F.
          Submitting write request with SG_REQ:
          ...Start Sector......................(100)
          ...Number of Sectors.................(30)
          ...Number of Scatter/Gather Buffers..(4)
          ...Request Status....................(0x00000000)
          ...Callback..........................(0x00000000)
          ...Scatter/Gather Buffer[0]..........(0x24023BA0)
          ...Scatter/Gather Buffer[0] Length...(1024)
          ...Scatter/Gather Buffer[1]..........(0x240245A0)
          ...Scatter/Gather Buffer[1] Length...(2048)
          ...Scatter/Gather Buffer[2]..........(0x24024DA0)
          ...Scatter/Gather Buffer[2] Length...(4096)
          ...Scatter/Gather Buffer[3]..........(0x24025DA0)
          ...Scatter/Gather Buffer[3] Length...(8192)
          Submitting read request.
          Verifying...
          Incorrect data at 0x240245A0. Expected: 0x00000200, Received: 0x00000100.
          Incorrect data at 0x240245A4. Expected: 0x000001FF, Received: 0x000000FF.
          Incorrect data at 0x240245A8. Expected: 0x000001FE, Received: 0x000000FE.
          Incorrect data at 0x240245AC. Expected: 0x000001FD, Received: 0x000000FD.
          Incorrect data at 0x240245B0. Expected: 0x000001FC, Received: 0x000000FC.

    These "Incorrect data" messages continue for 3584 lines, then the rest of the Read/Write tests pass.  This is the only test that fails in the group, and the Benchmark tests also pass.  I'm using a flash FMD that used to pass for the 1KB buffer version of this test.  Is anybody else experiencing this test failure?

    Monday, June 21, 2010 8:15 PM

All replies

  • Do you install all of QFEs?
    If the answer is true, maybe you find a bug in FMD driver.
    Assume you installed CE 6 shared source (private tree), the private\winceos\DRIVERS\fal\src\fal.cpp function Fal::ReadFromMedia, the following code always access sectors from pSG_req->sr_start, no matter how many sg_buf in a single sg_req.

     for(dwSectorAddr=pSG_req->sr_start; 
     dwSectorAddr<(pSG_req->sr_start + pSG_req->sr_num_sec) && ((pSGbuff->sb_len - dwSGBuffPos) >= g_pFlashMediaInfo->dwDataBytesPerSector);
     dwSectorAddr++)
     {
     //----- 3. Perform the LOGICAL -> PHYSICAL mapping to determine the physical sector address. -----

    Here is what you could try (but I haven't verified it yet), move the "dwSectorAddr=pSG_req->sr_start" from for loop to begin of Fal::ReadFromMedia function.

    //----- 1. Parse the scatter/gather request to determine if it can be fulfilled ----- pSG_req->sr_status = ERROR_IO_PENDING;
    dwSectorAddr=pSG_req->sr_start;
     ... 
    for(;
    dwSectorAddr<(pSG_req->sr_start +
     pSG_req->sr_num_sec) && ((pSGbuff->sb_len - dwSGBuffPos) >= g_pFlashMediaInfo->dwDataBytesPerSector); dwSectorAddr++)
    Wednesday, June 23, 2010 8:06 PM
  • Hi KMOS,

    I've updated with the QFEs through August 2010, and verified the same failure occurs.  I changed fal.cpp as you recommended, and chose Rebuild of my OSDesign, but the fal.lib that I'm linking from C:\WINCE600\PUBLIC\COMMON\OAK\LIB\X86\DEBUG is still dated 2006.  How do I rebuild the FAL?

    Thanks,

    Gary

    Thursday, October 7, 2010 6:09 PM
  • build -c in private\winceos\DRIVERS\fal
    And then you can rebuild the project (blddemo clean -q)

    But strongly recommend you to backup your PUBLIC\COMMON\OAK\LIB\ before doing anything!

    Thursday, October 7, 2010 10:42 PM
  • Hi KMOS,

    thanks for the guidance.  I backed up my PUBLIC\COMMON\OAK\LIB tree, and openned a CE build DOS box.  I could not find the fal directory you mentioned, so I tried build -c in PRIVATE\WINCEOS\DRIVERS\MSFLASH\SRC, which seemed to have several fal files.  I got a build error "don't know how to make" ... "msflash.def".  Am I building in the right location?  Am I missing some sources?  I think I installed all the shared source code....

    Thanks,

    Gary

    Friday, October 29, 2010 6:18 AM