Hi RT experts. We are reviewing device drivers of our product board and found qualmy codes in chipidea usb device, 4.19.0 applied RT patch(still exists in current) The function hw_usb_reset, called by isr_reset_handler, is using udelay to wait hw reset and commented "RTOS unfriendly". Can I be sure RT-safe is it? Could you suggest any better alternative? Thanks. Regards drivers/usb/chipidea/udc.c:325 /** * hw_usb_reset: restart device after a bus reset (execute without * interruption) * @ci: the controller * * This function returns an error code */ static int hw_usb_reset(struct ci_hdrc *ci) { hw_usb_set_address(ci, 0); /* ESS flushes only at end?!? */ hw_write(ci, OP_ENDPTFLUSH, ~0, ~0); /* clear setup token semaphores */ hw_write(ci, OP_ENDPTSETUPSTAT, 0, 0); /* clear complete status */ hw_write(ci, OP_ENDPTCOMPLETE, 0, 0); /* wait until all bits cleared */ while (hw_read(ci, OP_ENDPTPRIME, ~0)) udelay(10); /* not RTOS friendly */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* reset all endpoints ? */ /* reset internal status and wait for further instructions no need to verify the port reset status (ESS does it) */ return 0; } -- 황재호, Jay Hwang, linux team manager of RTst 010-7242-1593