/* This function schedule the USB transaction and will process the endpoint in the following order: iso, interrupt, control and bulk.  */
void fhci_schedule_transactions(struct fhci_usb *usb)
/* This function schedule the USB transaction and will process the endpoint in the following order: iso, interrupt, control and bulk.  */
void fhci_schedule_transactions(struct fhci_usb *usb)
{
	int left = 1;
	if (usb->actual_frame->frame_status & FRAME_END_TRANSMISSION)
		if (rotate_frames(usb) != 0)
			return;
	if (usb->actual_frame->frame_status & FRAME_END_TRANSMISSION)
		return;
	if (usb->actual_frame->total_bytes == 0) {
		scan_ed_list(usb, &usb->hc_list->iso_list, FHCI_TF_ISO);
		scan_ed_list(usb, &usb->hc_list->intr_list, FHCI_TF_INTR);
		left = scan_ed_list(usb, &usb->hc_list->ctrl_list,
				    FHCI_TF_CTRL);
	}
	if (left > 0)
		scan_ed_list(usb, &usb->hc_list->bulk_list, FHCI_TF_BULK);
}