cvs commit: src/sys/dev/usb ehci.c

Don Lewis truckman at FreeBSD.org
Mon Aug 20 06:04:05 PDT 2007


truckman    2007-08-20 13:04:05 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/dev/usb          ehci.c 
  Log:
  MFC ehci.c 1.56
  
    Replace three copies of the host controller reset sequence that
    differ in their details with calls to a new function, ehci_hcreset(),
    that performs the reset.
  
    The original sequences either had no delay or a 1ms delay between
    telling the controller to stop and asserting the controller reset
    bit.  One instance of the original reset sequence waited for the
    controller to indicate that its reset was complete before continuing,
    but the other two immediately let the subsequent code execute.  The
    latter is a problem on some hardware, because a read of the HCCPARAMS
    register returns an incorrect value while the reset is in progress,
    which triggers an infinite loop in ehci_pci_givecontroller(), which
    hangs the system on shutdown.
  
    The reset sequence in ehci_hcreset() starts with the most complete
    instance from the original code, which contains a loop to wait for
    the controller to indicate that its reset is complete.   This appears
    to be the correct thing to do according to "Enhanced Host Controller
    Interface Specification for Universal Serial Bus" revision 1.0,
    section 2.3.1.  Add another loop to wait for the controller to
    indicate that it has stopped before setting the HCRESET bit.  This
    is required by the section 2.3.1 in the specification, which says
    that setting HCRESET before the controller has halted "will result
    in undefined behaviour".
  
  Revision  Changes    Path
  1.36.2.4  +37 -18    src/sys/dev/usb/ehci.c


More information about the cvs-all mailing list