Hi Feng,
   You are right.  Once I fixed that everything works as expected.  Thanks
for taking the time to review my code.

Best Regards,
  Eric

> -----Original Message-----
> From: Tian, Feng [mailto:feng.t...@intel.com]
> Sent: Wednesday, June 17, 2015 12:14 AM
> To: Eric Wittmayer; edk2-devel@lists.sourceforge.net
> Cc: Tian, Feng
> Subject: RE: [edk2] USB question: how change to a different alternate
setting
> of an interface?
> 
> Hi, Eric
> 
> I glance through your code, looks like SelectInterface() has a bug, in
which
> 
> You set Request.RequestType = 0x0; but according to USB 2.0 spec 9.4.10,
it
> should be 0x01 for SET_INTERFACE request.
> 
> So which return value did you get for SelectInterface() invocation? It
should
> be EFI_DEVICE_ERROR with your original code, am I right?
> 
> Thanks
> Feng
> 
> -----Original Message-----
> From: Eric Wittmayer [mailto:e...@frescologic.com]
> Sent: Wednesday, June 17, 2015 14:06
> To: Tian, Feng; edk2-devel@lists.sourceforge.net
> Subject: RE: [edk2] USB question: how change to a different alternate
setting
> of an interface?
> 
> Hi Feng,
>   I'm still working to get my environment setup so I can see the debug
> messages from the USB stack.
> In the meantime, I made a simple test driver that looks for a USB webcam
> streaming interface and tries to select the first alternate.  The product
I'm
> writing a driver for isn't a webcam but that is the most common USB device
> with alternate settings.
> I wasn't sure if I should post the code to the list since it's not code to
include
> in edk2 so I've made the source available at this link:
> https://www.yousendit.com/download/bXBhakluT2IwVW12eE1UQw
> 
> Regards,
> Eric
> 
> > -----Original Message-----
> > From: Tian, Feng [mailto:feng.t...@intel.com]
> > Sent: Thursday, June 11, 2015 12:26 AM
> > To: edk2-devel@lists.sourceforge.net; e...@frescologic.com
> > Cc: Tian, Feng
> > Subject: RE: [edk2] USB question: how change to a different alternate
> setting
> > of an interface?
> >
> > Hi, Eric
> >
> > It should be enough to get alternative setting through these two steps
> > you did.
> >
> > Could you let me know whether you saw this debug message "
> > UsbSelectSetting: setting %d selected for interface %d " got printed ?
> > and which values are in the printed message?
> >
> > Thanks
> > Feng
> >
> > -----Original Message-----
> > From: Eric Wittmayer [mailto:e...@frescologic.com]
> > Sent: Thursday, June 11, 2015 14:20
> > To: edk2-devel@lists.sourceforge.net
> > Subject: [edk2] USB question: how change to a different alternate
> > setting
> of
> > an interface?
> >
> > Hello all,
> > I'm new to the list and to edk2/uefi.  I'm working on a USB device
> > driver
> for a
> > device that has interrupt endpoints declared on interface alternate #1.
> So
> > the default interface descriptor has zero endpoints and the alternate
> > 1 interface descriptor has 2 endpoints.  I am able to use
> > UsbIo->UsbControlTransfer to send a Set Interface command to the
> > UsbIo->device and
> > I can see on my usb analyzer that it does get sent.
> > After that I call UsbIo->UsbGetInterfaceDescriptor again to get what I
> > expected was the interface descriptor for alternate #1 but I get back
> > the same descriptor as before I set the interface.
> > Looking through the code I can see in the XhciDxe code for
> > XhcControlTransfer that it handles updating the xhci controllers
> > representation of the endpoints when it sees the select interface
> > command but I'm not sure if there is something else I need to do in
> > order to
> update the
> > data returned by UsbGetInterfaceDescriptor.
> >
> > How do I get the correct descriptors for the newly active alternate
> setting?
> > Will they have a different UsbIo protocol handle and if so how do I
> > find
> it?
> >
> > Thanks for any help.
> > Eric
> >
> >
> >
> >
>
----------------------------------------------------------------------------
> --
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel



------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to