lkml.org 
[lkml]   [2013]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectAbout TRB_TO_EP_INDEX() macro using
Date
Recently when I check xHCI code, find that some functions try to get EP index 
from a Command Completion Event TRB via TRB_TO_EP_INDEX() macro.

This is totally wrong. The macro definition is:

#define TRB_TO_EP_INDEX(p) ((((p) & (0x1f << 16)) >> 16) - 1)

TRB_TO_EP_INDEX only applies to Transfer Event TRB. But for Command
Completion Event TRB, there is no Endpoint ID field. So, we cannot directly
get EP index from these TRBs, but we can find it by the TRB Pointer.

Here list two functions for you to check:
handle_stopped_endpoint()
handle_reset_ep_completion()

Regards & Thanks!
Changbin




\
 
 \ /
  Last update: 2013-08-05 10:21    [W:0.037 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site