Removing USB cable while Serial USB Gadget Tx buffer is not empty makes iMX7/iMX6ULL Colibri dead. Serial console is dead, all TCP/IP communications, ping are dead. The issue is the same using kernel versions 4.9, 4.14, 5.4 down stream.
What’s interesting I had no issue using the same code and even the same kernel 4.14 on VF50/VF61. On VF everything just keeps going, though communications are in progress and USB Tx buffers thus are not empty. Rechecked it many times.
Any advice how to fix it? As I understand iMX USB driver is somehow broken. Since there’s no kernel dump I don’t know where to look.
Sorry for noise. Fixed. Looks like I’ve switched USB controller from otg to peripheral on VF. Porting to iMX7D I thought it is not necessary. Well, difference is serious. Hope it will help someone.