title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Plextor FUA command

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nachtzug

    • Apr 2014
    • 3

    Plextor FUA command

    Hello!

    I have a technical question about Plextor's FUA command. I did not find any informations (i.e. CDB) about it on the web. Can someone give me the technical description? SCSI CDB would be enough. I want to test something with own code, and I really need that information. thanks!!!!!

    It would also be interesting, how to detect support for that command. I guess, I just send it to the drive and look if request sense gives me "ok".

    Background: I experiment with Read CDDA (D8h) and that FUA-flag there doesn't work with my Plextors ("illegal flag in CDB").
  • Spoon
    Administrator
    • Apr 2002
    • 44583

    #2
    Re: Plextor FUA command

    SRB_ExecSCSICmd cmd;
    ZeroMemory(&cmd, sizeof(SRB_ExecSCSICmd));
    cmd.SRB_Cmd = SC_EXEC_SCSI_CMD;
    cmd.SRB_Flags = SRB_DIR_IN;
    cmd.SRB_BufLen = 255;
    cmd.SRB_BufPointer = MemBuffer;
    cmd.SRB_SenseLen = SENSE_LEN;
    cmd.SRB_CDBLen = 12;
    cmd.CDBByte[0] = 0xA8;
    cmd.CDBByte[1] = 8; // FUA set
    cmd.CDBByte[2] = (BYTE)((NextLBAAddress >> 24) & 0xFF);
    cmd.CDBByte[3] = (BYTE)((NextLBAAddress >> 16) & 0xFF);
    cmd.CDBByte[4] = (BYTE)((NextLBAAddress >> 8) & 0xFF);
    cmd.CDBByte[5] = (BYTE)(NextLBAAddress & 0xFF);
    Spoon
    www.dbpoweramp.com

    Comment

    • nachtzug

      • Apr 2014
      • 3

      #3
      Re: Plextor FUA command

      wow! fast answer, thanks!

      I have to adapt it for linux, but I guess, that's no problem.

      Originally posted by Spoon
      cmd.CDBByte[0] = 0xA8;
      cmd.CDBByte[1] = 8; // FUA set
      cmd.CDBByte[2] = (BYTE)((NextLBAAddress >> 24) & 0xFF);
      cmd.CDBByte[3] = (BYTE)((NextLBAAddress >> 16) & 0xFF);
      cmd.CDBByte[4] = (BYTE)((NextLBAAddress >> 8) & 0xFF);
      cmd.CDBByte[5] = (BYTE)(NextLBAAddress & 0xFF);
      but what is "NextLBAAddress"? And A8h is READ(12)?

      So I basically I use READ(12) with FUA-Bit set and use some "magic" NextLBAAddress (I guess it's the sector I want to flush) and Transfer Length == 0 (because of the memset)?

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44583

        #4
        Re: Plextor FUA command

        You invalidate it by reading from an address away from the current location.
        Spoon
        www.dbpoweramp.com

        Comment

        • nachtzug

          • Apr 2014
          • 3

          #5
          Re: Plextor FUA command

          ahh, ok.

          But now I already tested it a little bit. And it seems, at least with my drives, it doesn't matter if you use the same sector you want to read afterwards or not. It always trashes the cache. The "FUA" READ(12) enforces a fresh read from the drive, even if it is in cache again afterwards, a READ CD will get "fresh" data because of that. So you could emulate the missing FUA bit on READ CD with a preceeding "FUA" READ(12) on the same sector.

          Astonishingly, this method works with all drives I own (and that are a lot! ;-)). While not exactly against the MMC specs, this feature is not directly mentioned. But many drives behave as we want. Great! But why the hell you can use FUA with READ(12) and others, but not with READ CD? Odd specs...

          thanks a lot!

          btw: another odd thing is, that there're drives which gives you DATA+SUB+C2 instead of DATA+C2+SUB (which would be correct according the specs). Is there a way to *detect* that habbit other than "quirk" all known drives with that habbit or use some kind of heuristics on the C2/SUB part?

          My Plextor PX-L890SA returns DATA+SUB+C2, all other drives I own DATA+C2+SUB.

          Comment

          Working...

          ]]>