>that means the packet will be sent during next frame instead?
No, the sh_schedule_trans() got preempted when a xferdone irq occurs (Kinda like suspended/blocked), and will continue after the irq has been handled. (kinda like resume) >can we just change the hc_interrupt to > >if (.... && urb_state <= 0) >{ > if (urb_state == 0) add_packet > else schedule_trans > That is not totally correct, we can't really call sh_schedule_trans() again in the xferdone because it would try to schedule to isochronous urb, interrupt urb, control urb, and bulk urb again in that order. This would violate the USB spec. > >Pei Liu wrote: >> >> > >> >but i thought sh_done_list returns (urb_state = -1) if it is done??? >> >but in the hc_interrupt... it checks whether urb_state == 0... which >> >means it would not try another packet??? >> >> Yes, I think I understand your concern. The sh_done_list returns a -1 when >> it has completed the URB, in such case, the hc_interrupt would not call send >> another packet. But you still have to remember in the sh_schedule_trans >> routine, which initiated every SOF, would continue to call even after the >> hc_interrupt returns. The sequence is like this >> >> -->sh_schedule_trans >> ------>> scan_urb_list >> ----------->> sh_add_packet() >> >> ->hc_interrupt ; interrupt occurred because xferdone irq. In this case, the >> sh_schedule_trans would be pre-empted >> --->sh_done_list : take care of the xferdone irq >> -------> sh_add_packet if urb_state >=0 >> >> ...... >> >> ->hc_interrupt ; interrupt occurred because xferdone irq. >> --->sh_done_list : take care of the xferdone irq >> ---> hc_interrupt exits when urb_state = -1; >> >> --> sh_schedules continues with the next urb after all irq has handled. >> >> Pei > > >------------------------------------------------------- >This SF.NET email is sponsored by: FREE SSL Guide from Thawte >are you planning your Web Server Security? Click here to get a FREE >Thawte SSL guide and find the answers to all your SSL security issues. >http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en >_______________________________________________ >[EMAIL PROTECTED] >To unsubscribe, use the last form field at: >https://lists.sourceforge.net/lists/listinfo/linux-usb-devel ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel