bug? - from khci_dev.c : usb_dci_khci_get_xd()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

bug? - from khci_dev.c : usb_dci_khci_get_xd()

ソリューションへジャンプ
1,105件の閲覧回数
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)
  • USB

0 件の賞賛
返信
1 解決策
858件の閲覧回数
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 返答(返信)
858件の閲覧回数
csjc
Contributor II

again this is from the ksdk usb 1.0.0 GA release code

0 件の賞賛
返信
859件の閲覧回数
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 件の賞賛
返信
858件の閲覧回数
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 件の賞賛
返信