Communication error "can't set config #1, error -32" (USB) when plugg-in Nordic nrf52840 dongle (PCA10059) into xavier

Its not a Xavier module + custom board. It’s the official Xavier dev board, also the Dongle is not a custom board but a product sold by Nordic, see nRF52840 Dongle - nordicsemi.com

While playing with the linux kernel to find a reason, we found out that putting a delay at some place in the code will “fix” this problem.

Kernel patch:

Blockquote
diff -r -u kernel/kernel-4.9/drivers/usb/core/message.c xkernel/kernel-4.9/drivers/usb/core/message.c
— kernel/kernel-4.9/drivers/usb/core/message.c 2020-06-26 06:12:00.000000000 +0200
+++ xkernel/kernel-4.9/drivers/usb/core/message.c 2021-10-21 13:09:37.142332048 +0200
@@ -9,6 +9,7 @@
include <linux/mm.h>
include <linux/timer.h>
include <linux/ctype.h>
+#include <linux/delay.h>
include <linux/nls.h>
include <linux/device.h>
include <linux/scatterlist.h>
@@ -53,6 +54,7 @@
retval = usb_submit_urb(urb, GFP_NOIO);
if (unlikely(retval))
goto out;
+udelay(5000);
expire = timeout ? msecs_to_jiffies(timeout) : MAX_SCHEDULE_TIMEOUT;
if (!wait_for_completion_timeout(&ctx.done, expire)) {

So from what we observed, the “wait_for_completion_timeout” seems to return too quickly. We are no professional kernel hackers, would be interesting to see an official fix for this.