This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TUSB9261DEMO: TUSB9261DEMO

Part Number: TUSB9261DEMO
Other Parts Discussed in Thread: TUSB9261

Tool/software:

Hello,

I have question about PxCI register.

In the code, PxCI has command completion status. For example:

status = ahci_wait_complete(PxCI(scsi_cmd.pCmdInput->bLUN), (0x1 .....
is there any status for new incoming command ?
So, I want to made like this :
if ahci_wait_complete is done then :
   loop wait until 30 sec.
        if no incoming command , then stop hdd rotation.
        if there is any incoming command , then cancel the 30 sec loop
.
any suggestion ?
Thank you before
  • Hi Woody,

    It sounds like you are modifying the FW for the TUSB9261.  The firmware is provided as-is without support.

    Here is the definition for the ahci_wait_complete() function:

    /*****************************************************************************
     * Function: ahci_wait_complete
     *************************************************************************//**
     * This function waits up to a specified number of milliseconds
     * for a register's masked value to equal the completion value.
     *
     * @param[in] addr       register address.
     * @param[in] cmplt_mask completion mask.
     * @param[in] cmplt_val  completion value.
     * @param[in] timeout_ms timeout value in milliseconds.
     *
     * @retval STATUS_OK when successful.
     * @retval STATUS_TIMEOUT when wait times out.
     *
     ******************************************************************************
     */
    if ahci_wait_complete is done then :

    This statement will always be TRUE; ahci_wait_complete will always be done and return either STATUS_OK or STATUS_TIMEOUT.

     If you would like to increase the wait time, then increase the timeout_ms parameter of the function.  

    Does this help answer your question?

    Regards,

    Nicholaus