usb_ep_fifo_status — returns number of bytes in fifo, or error
int usb_ep_fifo_status ( | struct usb_ep * ep) ; |
FIFO endpoints may have “unclaimed data” in them in certain cases, such as after aborted transfers. Hosts may not have collected all the IN data written by the gadget driver (and reported by a request completion). The gadget driver may not have collected all the data written OUT to it by the host. Drivers that need precise handling for fault reporting or recovery may need to use this call.
This returns the number of such bytes in the fifo, or a negative errno if the endpoint doesn't use a FIFO or doesn't support such precise handling.