[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130806090654.GA27268@kroah.com>
Date: Tue, 6 Aug 2013 17:06:54 +0800
From: "'gregkh@...uxfoundation.org'" <gregkh@...uxfoundation.org>
To: "Du, ChangbinX" <changbinx.du@...el.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"balbi@...com" <balbi@...com>,
"sarah.a.sharp@...uxfoundation.org"
<sarah.a.sharp@...uxfoundation.org>, "Wu, Hao" <hao.wu@...el.com>,
"Tang, Jianqiang" <jianqiang.tang@...el.com>,
"Zhuang, Jin Can" <jin.can.zhuang@...el.com>,
"Huang, Xiaochao" <xiaochao.huang@...el.com>
Subject: Re: About TRB_TO_EP_INDEX() macro using
On Tue, Aug 06, 2013 at 08:59:32AM +0000, Du, ChangbinX wrote:
> > On Mon, Aug 05, 2013 at 08:07:25AM +0000, Du, ChangbinX wrote:
> > > 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()
> >
> > Care to send a patch showing how you would change this if it is
> > incorrect?
> >
> > thanks,
> >
> > greg k-h
> > --
>
> Hello, Greg k-h. I am not very sure about this issue. If this is true, kernel will panic when
> invoking above functions. I want someone help to confirm if I miss something. If it's really
> a bug, I will work out a patch to fix it.
That's not how kernel development works, sorry. If you think this is an
issue, try to reproduce it and then create a patch.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists