Give correct return code in cgsem_mswait
Convert the usb callback function to using cgsem_t timed waits to avoid race conditions with conditionals/mutexes.