USB Ethernet Gadget not connecting

I have a USB Ethernet Gadget that when I connect to other Ubuntu18.04 machines it attaches fine and I see it as a network interface

4: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b6:30:f8:52:01:76 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::b430:f8ff:fe52:176/64 scope link
       valid_lft forever preferred_lft forever

Here is the dmesg log when I plug in the device to a working setup:

[   66.350555] usb 1-1.2: new high-speed USB device number 3 using xhci_hcd
[   66.451897] usb 1-1.2: New USB device found, idVendor=1cf2, idProduct=a4a2, bcdDevice= 3.14
[   66.451918] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   66.451931] usb 1-1.2: Product: RNDIS/Ethernet Gadget
[   66.451944] usb 1-1.2: Manufacturer: Linux 3.14.70-fslc+g34b9927 with 2184000.usb
[   66.519502] cdc_eem 1-1.2:1.0 usb0: register 'cdc_eem' at usb-0000:01:00.0-1.2, CDC EEM Device, b6:30:f8:52:01:76
[   66.521772] usbcore: registered new interface driver cdc_eem

However, when I attach the device to the TX2 NX it does not show up as an NIC and I get these logs in dmesg:

[  153.497340] usb 1-2.4: new high-speed USB device number 5 using tegra-xusb
[  153.519325] usb 1-2.4: New USB device found, idVendor=1cf2, idProduct=a4a2
[  153.519348] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  153.519366] usb 1-2.4: Product: RNDIS/Ethernet Gadget
[  153.519381] usb 1-2.4: Manufacturer: Linux 3.14.70-fslc+g34b9927 with 2184000.usb

Seems the device is not getting registered with cdc_eem. I tried loading this module and I see it in lsmod
however I’m still not able to get the device to register Nvidia board. Any help is greatly appreciated.

Module                  Size  Used by
bnep                   16562  2
fuse                  104554  3
xt_conntrack            3609  1
ipt_MASQUERADE          2346  1
nf_nat_masquerade_ipv4     3111  1 ipt_MASQUERADE
nf_conntrack_netlink    29413  0
nfnetlink               7959  2 nf_conntrack_netlink
xt_addrtype             3670  2
iptable_filter          2481  1
iptable_nat             2882  1
nf_conntrack_ipv4      11992  2
nf_defrag_ipv4          1836  1 nf_conntrack_ipv4
nf_nat_ipv4             6712  1 iptable_nat
nf_nat                 20406  2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack          106659  6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter           16216  0
overlay                48718  0
hid_logitech_hidpp     23004  0
userspace_alert         5828  0
hid_logitech_dj        13813  0
zram                   25920  4
cdc_eem                 4282  0
spidev                 13218  0
nvgpu                1589200  18
ip_tables              19441  2 iptable_filter,iptable_nat
x_tables               28951  5 ip_tables,iptable_filter,ipt_MASQUERADE,xt_addrtype,xt_conntrack

Edit:
Using L4T 34.1.1

Sounds like you have an actual device, and not a virtual “fake” device (which is what the “gadget” API is for). I’d avoid calling it a gadget since it would make people think this is software-based and not hardware.

In the USB registry one can search for the manufacturer ID and product ID within the manufacturer. Manufacturer 1cf2 does not show up, and thus, even though USB is 100% working, and the driver is present, the hot plug system does not know to link that particular hardware with that particular driver. Likely this means the systems which work have a udev file for this purpose.

I did not see that manufacturer ID, and so it wasn’t possible to look up the actual product manufacturer and model. Possibly with that one could find the udev file, maybe even directly installable with apt-get (maybe).

What is the exact brand and model of the device? Also, on a Ubuntu system which works, what do you see from:
sudo find /etc/udev
(one of those files might work if the udev file is present and you can’t find the file by other means)