Re: Is USB 2.0 really stable in CE 5.0?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



David,
If you're still monitoring this tread, you should know that the
modifications that I made according to the diff documents actually rendered
the USB non-functional.

Do you have an actual QFE number or link that is associated with thsi fix?
Regards
Chuck

"chuckl" wrote:

> David, thanks for the reply.
>
> I've got the latest available QFE - Q2 2005. Looks like the code you posted
> hasn't been made available yet, as it's not in my source tree.
>
> I'll make the changes as indicated by the diff, and re-post when I have the
> results.
>
> First I have to figure out how to clone the code & link it, so I'm not
> modifying the code in the PUBLIC tree. I've got the Hall/Maillet article
> "Cloning the Microsoft Public Common Code" article, and plan to follow that.
>
> Thanks again,
> Chuck
>
> "David Liao (MS)" wrote:
>
> > Did you get latest QFE on USB EHCI drivers?
> > Recently, we did fix somthing like this.
> > I attached the fix that related to this in case you need it.
> >
> > EHCI: m_fIsHalted is not updated for control pipes
> > Unset the m_flsHalted when it is CONTROL endpoint.
> > Affected files ...
> > ....
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/CPipe.cpp#5
> > edit
> > ....
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/CPipe.h#3
> > edit
> > ....
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/trans.cpp#4
> > edit
> >
> > Differences ...
> >
> > ====
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/CPipe.cpp#5
> > (text) ====
> >
> > @@ -446,7 +446,8 @@
> > else {
> > ASSERT(FALSE);
> > // Can not Queue.
> > - m_fIsHalted = TRUE;
> > + if (GetType()!= TYPE_CONTROL) // Only setup Halt when it is not
> > CONTROL endpoint.
> > + m_fIsHalted = TRUE;
> > m_pQueuedTransfer = pCurTransfer;
> > m_pQueuedTransfer ->AbortTransfer();
> > CheckForDoneTransfers();
> > @@ -481,6 +482,8 @@
> > if (pCurTransfer->IsTransferDone() == TRUE) {
> > ASSERT(m_pPipeQHead->IsActive() == FALSE) ;// Pipe Stopped.
> > m_fIsHalted = (pCurTransfer->DoneTransfer()!=TRUE);
> > + if (GetType()!= TYPE_CONTROL) // Only setup Halt when it is not
> > CONTROL endpoint.
> > + m_fIsHalted = FALSE;
> > // Put it into done Queue.
> > delete pCurTransfer;
> > if (m_fIsHalted)
> >
> > ====
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/CPipe.h#3
> > (text) ====
> >
> > @@ -34,6 +34,7 @@
> > #include <pipeabs.hpp>
> > #include "ctd.h"
> > #include "usb2lib.h"
> > +typedef enum { TYPE_UNKNOWN =0, TYPE_CONTROL, TYPE_BULK, TYPE_INTERRUPT,
> > TYPE_ISOCHRONOUS } PIPE_TYPE;
> > class CPhysMem;
> > class CEhcd;
> > typedef struct STRANSFER STransfer;
> > @@ -53,6 +54,8 @@
> >
> > virtual ~CPipe();
> >
> > + virtual PIPE_TYPE GetType () { return TYPE_UNKNOWN; };
> > +
> > virtual HCD_REQUEST_STATUS OpenPipe( void ) = 0;
> >
> > virtual HCD_REQUEST_STATUS ClosePipe( void ) = 0;
> > @@ -196,6 +199,8 @@
> > IN CEhcd * const pCEhcd);
> > ~CBulkPipe();
> >
> > + virtual PIPE_TYPE GetType () { return TYPE_BULK; };
> > +
> > HCD_REQUEST_STATUS OpenPipe( void );
> > HCD_REQUEST_STATUS ClosePipe( void );
> > // ****************************************************
> > @@ -233,6 +238,9 @@
> > IN const UCHAR bHubAddress,IN const UCHAR bHubPort,
> > IN CEhcd * const pCEhcd);
> > ~CControlPipe();
> > +
> > + virtual PIPE_TYPE GetType () { return TYPE_CONTROL; };
> > +
> > void ChangeMaxPacketSize( IN const USHORT wMaxPacketSize );
> > HCD_REQUEST_STATUS OpenPipe( void );
> > HCD_REQUEST_STATUS ClosePipe( void );
> > @@ -291,6 +299,8 @@
> > IN CEhcd * const pCEhcd);
> > ~CInterruptPipe();
> >
> > + virtual PIPE_TYPE GetType () { return TYPE_INTERRUPT; };
> > +
> > HCD_REQUEST_STATUS OpenPipe( void );
> > HCD_REQUEST_STATUS ClosePipe( void );
> > #ifdef DEBUG
> > @@ -340,6 +350,8 @@
> > IN CEhcd *const pCEhcd);
> > ~CIsochronousPipe();
> >
> > + virtual PIPE_TYPE GetType () { return TYPE_ISOCHRONOUS; };
> > +
> > HCD_REQUEST_STATUS OpenPipe( void );
> >
> > HCD_REQUEST_STATUS ClosePipe( void );
> >
> > ====
> > //depot/main/pb/ship/public/COMMON/oak/drivers/usb/hcd/usb20/ehci/trans.cpp#4
> > (text) ====
> >
> > @@ -295,7 +295,13 @@
> > dwDataNotTransferred +=
> > pCurTD ->qTD_Token.qTD_TContext.BytesToTransfer ;
> > if (pCurTD->qTD_Token.qTD_TContext.Halted==1) { // This
> > Transfer Has been halted due to error.
> > // This is error. We do not have error code for EHCI so
> > generically we set STALL error.
> > - if (dwUsbError == USB_NO_ERROR)
> > + if (pCurTD->qTD_Token.qTD_TContext.BabbleDetected) {//
> > Babble.
> > + dwUsbError = USB_DATA_OVERRUN_ERROR ;
> > + }
> > + else if (pCurTD->qTD_Token.qTD_TContext.DataBufferError) {
> > + dwUsbError = ((m_sTransfer.dwFlags
> > &USB_IN_TRANSFER)!=0? USB_BUFFER_OVERRUN_ERROR : USB_BUFFER_UNDERRUN_ERROR);
> > + }
> > + else if (dwUsbError == USB_NO_ERROR)
> > dwUsbError = USB_STALL_ERROR;
> > }
> > else
> >
> >
> >
> > "chuckl" <chuckl@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:AFBA6E4A-6884-4315-AE9F-96F967DDDDCF@xxxxxxxxxxxxxxxx
> > > My device uses USB 2.0 to talk to two subsystems. One is a flash card,
> > > interfaced through a SMSC 2228 chip. The other device is a scanner,
> > > interfaced to USB through a Cypress chip.
> > >
> > > The problem is that over a dozen or so units, the USB is not 100%
> > > reliable.
> > > Sometimes the scanner doesn't attach at powerup, sometimes the flash card
> > > gets dropped after a couple of hours. I've traced these problems to the
> > > code
> > > in USB20\EHCI\trans.cpp, where the USB packet context Halted bit is found
> > > to
> > > be set, so the USB code sets "bus stall" and that device stops.
> > >
> > > I've looked at the USB signal levels with a good quality scope and the
> > > signal levels are fine.
> > >
> > > I've swapped parts around, and can say that when a problem exists, it
> > > follows the CPU motherboard around. We're using a VIA EPIA-MS motherboard
> > > w/
> > > x86 compatible CPU.
> > >
> > > VIA says they know of no problems with their chipset. They suspect CE.
> > >
> > > Can anyone tell me the level of stability I can expect from CE 5.0?
> > >
> > > Thanks, Chuck
> >
> >
> >
.



Relevant Pages

  • Re: USB 2.0 and WinXP unable to work together
    ... > Windows XP USB2.0 does not support Legacy USB 2.0 BIOS support. ... > Thanks, David & R. McArty. ... that Knowledge Base article is very ...
    (microsoft.public.windowsxp.general)
  • Re: Is USB 2.0 really stable in CE 5.0?
    ... David, thanks for the reply. ... as it's not in my source tree. ... > Unset the m_flsHalted when it is CONTROL endpoint. ... >> My device uses USB 2.0 to talk to two subsystems. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Download speed
    ... Folks (Ed and David) ... USB not enhanced for USB2. ... >> First start at the machine BIOS and be sure your USB ports are ...
    (rec.photo.digital.slr-systems)
  • Re: SBS 2K3 Backup to External USB Hard Drive
    ... The USB port should be 2.0. ... "David" wrote: ... > I would also reccomend mirroring to the SCSI disk and using a 120GB IDE disk ... > for VSS, works fine too. ...
    (microsoft.public.windows.server.sbs)
  • Re: What the heck? UK lottery tickets abroad?
    ... Your best bet it is to use a live CD or USB and bypass the HDD altogether. ... on MSN/Yahoo/IRC, browse the web, edit office apps etc. ... My large USB stick even allows me to edit video and audio, edit pictures, ...
    (uk.legal)