usbdReqHCshutdown
Purpose
Requests USBD to shutdown all devices attached to HC.Syntax
#include <hcdi.h>
USBstatus usbdReqHCshutdown(pHCDI)
PHCDI pHCDI;
Parameter
Item | Description |
---|---|
pHCDI | Pointer to the HCDI structure. |
Description
This function is a USBD supplied function called by the HCD when a catastrophic event occurred and the HC is reset. The USBD aborts all pending I/O and delete all enumerated devices that are associated with the specified host controller.
This call is called when an error is detected with the adapter and the recovery of adapter driver from this error requires shutting down the adapter. Upon invocation, the function queues in a shutdown host controller command to the config proc of USBD. When the config proc is scheduled by the operating system, the USB system driver walks through the device tree and for each device present in the device tree, ends all the outstanding I/O, disconnects all the pipes, and unmaps the mapped buffers that are associated with the client.
Execution Environment
This function can be called from the interrupt (HCD_OFFLEVEL priority or lower) or process environment.
Return Values
Value | Description |
---|---|
USBD_SUCCESS | Success |
All others | Failure |