• Jeffrey Lee's avatar
    Fix aborts on reset/*rmkill USBDriver · 75f42235
    Jeffrey Lee authored
    Detail:
      c/cmodule, cmhg/modhead - Don't shutdown DWC layer during Service_USBDriver_Dying. Instead, only do it during Service_ModulePostFinal/Service_PreReset(/module finialisation). Also during Service_PreReset, deregister with USBDriver. This ensures we're deregistered with USBDriver before we shut down the DWC layer, and so don't have to worry about receiving events from USBDriver after the DWC layer is shut down.
      c/dwc_common_riscos, c/dwc_otg_riscos, h/dwc_common_riscos - Improve handling of DWC endpoint disable callbacks. The memory block for the endpoint now has a flag set in its header when a callback is pending, allowing us to avoid double-free situations if both ourselves and the DWC layer decide to free the endpoint.
      c/softc_root - Correct some debug messages
      dwc/driver/c/dwc_otg_hcd - Fix qh_list_free to use DWC_LIST_FOREACH_SAFE (as dwc_otg_hcd_qh_remove_and_free will remove entries from the list) - fixes potential double-free if a non-empty list is being freed
      dwc/driver/c/dwc_otg_hcd_intr - Fix building of debug builds
    Admin:
      Tested in Pi ROM with high processor vectors
      Resets and killing/reiniting USBDriver now works properly
    
    
    Version 0.08. Tagged as 'DWCDriver-0_08'
    75f42235
softc_root 10.7 KB