bug? - from khci_dev.c : usb_dci_khci_get_xd()

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

bug? - from khci_dev.c : usb_dci_khci_get_xd()

跳至解决方案
1,207 次查看
csjc
Contributor II

when there are no entries, the return path calls OS_Mutex_unlock instead of OS_Unlock() used in the success return path.

    /* This function can be called from any context, and it needs mutual

       exclusion with itself.*/

    OS_Lock();

   

    /* Get a transfer descriptor for the specified endpoint

     ** and direction

     */

    if (!usb_dev_ptr->xd_entries)

    {

        OS_Mutex_unlock(usb_dev_ptr->mutex);

        return USBERR_DEVICE_BUSY;

    }

标签 (1)
0 项奖励
回复
1 解答
960 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Chris,

It is a known issue, the correct code should be:

    if (!usb_dev_ptr->xd_entries)

    {

        OS_Unlock();

        return USBERR_DEVICE_BUSY;

    }

The fixed code will be released at this December.

Thank you.


Wish it helps.
best regards
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
3 回复数
960 次查看
csjc
Contributor II

again this is from the ksdk usb 1.0.0 GA release code

0 项奖励
回复
961 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Chris,

It is a known issue, the correct code should be:

    if (!usb_dev_ptr->xd_entries)

    {

        OS_Unlock();

        return USBERR_DEVICE_BUSY;

    }

The fixed code will be released at this December.

Thank you.


Wish it helps.
best regards
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
960 次查看
csjc
Contributor II

It wasn't known to me.  Is there a public list?

This is the type of bug that can cause a significant amount of wasted debug time.  Please impress on the appropriate team that the errta needs be kept up to date.

0 项奖励
回复