Linux-USB Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Isaac Ganoung <inventor500@vivaldi.net>
To: jtornosm@redhat.com
Cc: jtornosm@redhat.com, davem@davemloft.net, edumazet@google.com,
	 jarkko.palviainen@gmail.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org,  linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	 stable@vger.kernel.org
Subject: RE: [PATCH v2] net: usb: ax88179_178a: avoid writing the mac address before first reading
Date: Mon, 29 Apr 2024 18:16:05 -0500	[thread overview]
Message-ID: <hzhomd7d7uc4dcnpvd6ki6v2f6camzm5ufqp2syqudrvzzfxi4@ykcirhonbqql> (raw)

[-- Attachment #1: Type: text/plain, Size: 5457 bytes --]


Hello,

I am using a TP-Link UE306 USB Ethernet adapter. The kernel detects it as an ASIX AX88179A USB Ethernet adapter. When using a different MAC address than the adapter's own (i.e. MAC address randomization), I am unable to send or receive packets unless set to promiscuous mode.

I am using NetworkManager to manage my connections. When I set 802-3-ethernet.cloned-mac-address to the device's MAC address in the connection settings (i.e. `nmcli con edit), the device works as expected. When that property is not set (null value), the device is only able to receive packets when set to promiscuous mode.

uname -a output: Linux hostname 6.8.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 28 Apr 2024 18:53:26 +0000 x86_64 GNU/Linux
This is Arch Linux's kernel. The patches applied are here: <https://github.com/archlinux/linux/releases/tag/v6.8.8-arch1>

dmesg:
[37988.917741] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
[37989.208722] usb 2-2: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00
[37989.208744] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[37989.208753] usb 2-2: Product: AX88179A
[37989.208760] usb 2-2: Manufacturer: ASIX
[37989.208766] usb 2-2: SerialNumber: 0003B40D
[37989.481930] cdc_ncm 2-2:2.0: MAC-Address: <removed>
[37989.481949] cdc_ncm 2-2:2.0: setting rx_max = 16384
[37989.494646] cdc_ncm 2-2:2.0: setting tx_max = 16384
[37989.506072] cdc_ncm 2-2:2.0 eth1: register 'cdc_ncm' at usb-0000:00:14.0-2, CDC NCM (NO ZLP), <removed>

journalctl (from when not in promiscuous mode):
Apr 29 17:34:47 hostname kernel: usb 2-1: new SuperSpeed USB device number 5 using xhci_hcd
Apr 29 17:34:48 hostname kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00
Apr 29 17:34:48 hostname kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 29 17:34:48 hostname kernel: usb 2-1: Product: AX88179A
Apr 29 17:34:48 hostname kernel: usb 2-1: Manufacturer: ASIX
Apr 29 17:34:48 hostname kernel: usb 2-1: SerialNumber: 0003B40D
Apr 29 17:34:48 hostname kernel: cdc_ncm 2-1:2.0: MAC-Address: <removed>
Apr 29 17:34:48 hostname kernel: cdc_ncm 2-1:2.0: setting rx_max = 16384
Apr 29 17:34:48 hostname kernel: cdc_ncm 2-1:2.0: setting tx_max = 16384
Apr 29 17:34:48 hostname kernel: cdc_ncm 2-1:2.0 eth1: register 'cdc_ncm' at usb-0000:00:14.0-1, CDC NCM (NO ZLP), <removed>
Apr 29 17:34:48 hostname NetworkManager[5652]: <info>  [1714430088.5005] manager: (eth1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/14)
Apr 29 17:34:48 hostname mtp-probe[6423]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-1"
Apr 29 17:34:48 hostname mtp-probe[6423]: bus: 2, device: 5 was not an MTP device
Apr 29 17:34:49 hostname (udev-worker)[6422]: Network interface NamePolicy= disabled on kernel command line.
Apr 29 17:34:49 hostname NetworkManager[5652]: <info>  [1714430089.1558] device (eth1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Apr 29 17:34:49 hostname mtp-probe[6456]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-1"
Apr 29 17:34:49 hostname mtp-probe[6456]: bus: 2, device: 5 was not an MTP device
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2247] device (eth1): carrier: link connected
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2255] device (eth1): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2275] policy: auto-activating connection 'Wired connection 2' (e1106b48-8695-3ed4-b512-a0909ddaa247)
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2279] device (eth1): Activation: starting connection 'Wired connection 2' (e1106b48-8695-3ed4-b512-a0909ddaa247)
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2280] device (eth1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.2282] manager: NetworkManager state is now CONNECTING
Apr 29 17:34:51 hostname NetworkManager[5652]: <warn>  [1714430091.2284] platform-linux: do-change-link[9]: failure 16 (Device or resource busy)
Apr 29 17:34:51 hostname systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.3634] device (eth1): set-hw-addr: set-cloned MAC address to 6A:0D:A2:E2:9D:A6 (random)
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.3646] device (eth1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.3729] device (eth1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.3740] dhcp4 (eth1): activation: beginning transaction (timeout in 45 seconds)
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.3791] dhcp4 (eth1): dhclient started with pid 6459
Apr 29 17:34:51 hostname dhclient[6459]: DHCPREQUEST for 192.168.1.169 on eth1 to 255.255.255.255 port 67
Apr 29 17:34:51 hostname dhclient[6459]: DHCPNAK from 192.168.1.1
Apr 29 17:34:51 hostname NetworkManager[5652]: <info>  [1714430091.4578] dhcp4 (eth1): state changed no lease

Thanks,
Isaac Ganoung

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

             reply	other threads:[~2024-04-29 23:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 23:16 Isaac Ganoung [this message]
2024-04-30 15:27 ` [PATCH v2] net: usb: ax88179_178a: avoid writing the mac address before first reading Jakub Kicinski
2024-04-30 16:00   ` Jose Ignacio Tornos Martinez
2024-05-08  5:42     ` Yongqin Liu
2024-05-08  7:56       ` Jose Ignacio Tornos Martinez
2024-05-08 10:41         ` Yongqin Liu
2024-05-14  6:29           ` Yongqin Liu
2024-05-14  7:00             ` Jose Ignacio Tornos Martinez
2024-05-14  9:14               ` Yongqin Liu
2024-05-23  4:17                 ` Yongqin Liu
  -- strict thread matches above, loose matches on Subject: below --
2024-05-09 21:09 Jeffery Miller
2024-05-10  6:08 ` Jose Ignacio Tornos Martinez
2024-04-17  8:55 Jose Ignacio Tornos Martinez
2024-04-18 17:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hzhomd7d7uc4dcnpvd6ki6v2f6camzm5ufqp2syqudrvzzfxi4@ykcirhonbqql \
    --to=inventor500@vivaldi.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jarkko.palviainen@gmail.com \
    --cc=jtornosm@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).