From nobody Sun Mar 10 18:19:30 2024 X-Original-To: usb@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tt7Tv69kgz5DLnh for ; Sun, 10 Mar 2024 18:19:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tt7Tv56LXz4Dqq for ; Sun, 10 Mar 2024 18:19:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710094771; a=rsa-sha256; cv=none; b=SrWWQRiEsQY7ARDb/lRJY6TOg4UfCF+Xe2uudlVrrcQOkPvooM0ESwD6A0n3O++fVglFHw T8VkbKiPV1hP23SWFS/VgJQXQ/OlZRUJZE7MkjxgQ1krlbbyhKSX0h8GnWfgcEs/9qX3OX PgxtiWGvhmWPFCI88vwFSyfQoVgB3UmyFJTvijWLCxHNNXKaJTBWeUuJeQonHzKm62+Po7 UNJsUjXJ+K4UrkYD4I5+n0wuBCHypyGNDzHFFSKWdgaakqCnn+tCOMn2S+D99QPO/z/DL0 mDW0aqeoA+FXdb9JUc9t6TyF2IvbI9jh5d813cqcjCQp5GKgd36Aaev78lw3Rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710094771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7GpMlKYzpzUpU7UOSl7u3EicBZ6/UbCAD1G8h3LdmFc=; b=Iz0DV5JESPlvHMnTY3rSM3iPYNAKDKK+zVbS3FGMD3XGDj9T6DnaWJZkgrknLN599XJwPG CqrdkreISrPpbeS0cqv6gEb0an9M8tMGV/+/Xhvjcesa64qm0sSGUqQM4ymGBIKrkyVrzA S3FH/dOdFv4I6gjc8v9x3kS01iDH6ai9Hq20JmBIqyRnqgH8duQJJiLyuNa7WJSgvazWou zjK1umqZh0Nw2iR8W7CwrzP/gYKxpF65kp94gFqcTeVBtiRCXZUK3RTLI7gzkjaC3UXS2Y xycMO65/bd4DEALTdQLsLwCHRLb1Eqg2toJQtSDWLZkDj3bAt2PeAFpdoJpXiw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tt7Tv4k9tzwjt for ; Sun, 10 Mar 2024 18:19:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 42AIJVPd076209 for ; Sun, 10 Mar 2024 18:19:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 42AIJV6q076208 for usb@FreeBSD.org; Sun, 10 Mar 2024 18:19:31 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: usb@FreeBSD.org Subject: [Bug 267514] AXGE(4) ASIX AX88179A ue0: link state changed to DOWN Date: Sun, 10 Mar 2024 18:19:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: Andrey.Kosachenko@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267514 Andrey Kosachenko changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Andrey.Kosachenko@gmail.com --- Comment #8 from Andrey Kosachenko --- (In reply to karl from comment #5) The same issue observed over here too. =C2=BB uname -v FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:= 23 UTC 2023=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC I've got a usb-dock with 1GB ethernet port: =3D=3D=3D ~ =C2=BB usbconfig -d1.7 dump_device_desc ugen1.7: at usbus1, cfg=3D1 md=3DHOST spd=3DSUPER (5.0Gbps)= pwr=3DSAVE (46mA) bLength =3D 0x0012=20 bDescriptorType =3D 0x0001=20 bcdUSB =3D 0x0320=20 bDeviceClass =3D 0x0000 bDeviceSubClass =3D 0x0000=20 bDeviceProtocol =3D 0x0000=20 bMaxPacketSize0 =3D 0x0009=20 idVendor =3D 0x0b95=20 idProduct =3D 0x1790=20 bcdDevice =3D 0x0200=20 iManufacturer =3D 0x0001 iProduct =3D 0x0002 iSerialNumber =3D 0x0003 <00324FA6> bNumConfigurations =3D 0x0003=20 =3D=3D=3D the links used to go up/down constantly (every 30-40 secs): =3D=3D=3D =C2=BB ssed -nRe '/Mar 9.+ue0: link state/p;' /var/log/messages | tail=20= =20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20 silent@beastie Mar 9 23:53:20 beastie kernel: ue0: link state changed to DOWN Mar 9 23:53:21 beastie kernel: ue0: link state changed to UP Mar 9 23:56:10 beastie kernel: ue0: link state changed to DOWN Mar 9 23:56:10 beastie kernel: ue0: link state changed to UP Mar 9 23:56:20 beastie kernel: ue0: link state changed to DOWN Mar 9 23:56:21 beastie kernel: ue0: link state changed to UP Mar 9 23:59:10 beastie kernel: ue0: link state changed to DOWN Mar 9 23:59:10 beastie kernel: ue0: link state changed to UP Mar 9 23:59:11 beastie kernel: ue0: link state changed to DOWN Mar 9 23:59:11 beastie kernel: ue0: link state changed to UP =C2=BB ssed -nRe 's/(Mar 9 [0-9]+):[0-9]+:[0-9]+(.+ue0: link state changed)/\1H:MM:SS\2/p;' /var/log/messages | sort | uniq -c 121 Mar 9 21H:MM:SS beastie kernel: ue0: link state changed to DOWN 121 Mar 9 21H:MM:SS beastie kernel: ue0: link state changed to UP 97 Mar 9 22H:MM:SS beastie kernel: ue0: link state changed to DOWN 97 Mar 9 22H:MM:SS beastie kernel: ue0: link state changed to UP 102 Mar 9 23H:MM:SS beastie kernel: ue0: link state changed to DOWN 102 Mar 9 23H:MM:SS beastie kernel: ue0: link state changed to UP =3D=3D=3D There is a workaround though found in this thread (suggested by PHK): https://lists.freebsd.org/archives/freebsd-current/2024-March/005680.html. NB: that workaround comes at cost though (speed decreases, nevertheless in = my case I was able to get more than 200Mbps which is fine for my use case) Seems PHK added quirk into the src. Whereas the same can be achieved via usbconfig. In particular did the following: By default device is attache axge driver: =3D=3D=3D =C2=BB usbconfig -d1.7 show_ifdrv ugen1.7: at usbus1, cfg=3D0 md=3DHOST spd=3DSUPER (5.0Gbps)= pwr=3DSAVE (46mA) ugen1.7.0: axge0: =3D=3D=3D so decided to find out whether the suggested trick to replace it with cdce = will work.=20 First of all found out that device supports several configurations (default= is 0): =3D=3D=3D =C2=BB usbconfig -d1.7 dump_all_desc | egrep '(bNumConfigurations|Configura= tion index)' bNumConfigurations =3D 0x0003=20 Configuration index 0 Configuration index 1 Configuration index 2 =3D=3D=3D so tried it to change to 1 and it worked out: =3D=3D=3D ~ =C2=BB sudo usbconfig -d 1.7 set_config 1 ~ =C2=BB usbconfig -d1.7 show_ifdrv ugen1.7: at usbus1, cfg=3D1 md=3DHOST spd=3DSUPER (5.0Gbps)= pwr=3DSAVE (46mA) ugen1.7.0: cdce0: =3D=3D=3D after that was done no link up/down flapping observed anymore. Extended devd configuration (to avoid manual handling) and it works quite w= ell (configuration below includes lagg (failover to WiFi), so it looks a bit excessive but I believe the idea is clear) =3D=3D=3D notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; match "type" "ATTACH"; match "vendor" "0x0b95"; match "product" "0x1790"; # action "logger -tUE0 /usr/sbin/usbconfig -d $cdev set_config 1"; action "/usr/sbin/usbconfig -d $cdev set_config 1 && /usr/sbin/usbconfi= g -d $cdev power_save"; }; notify 100 { match "system" "IFNET"; match "subsystem" "ue0"; match "type" "ATTACH"; action "/sbin/ifconfig $subsystem up promisc"; }; notify 100 { match "system" "IFNET"; match "subsystem" "ue0"; match "type" "DETACH"; action "/sbin/ifconfig lagg0 laggport wlan0 && /sbin/ifconfig wlan0 up"; }; notify 100 { match "system" "IFNET"; match "subsystem" "ue0"; match "type" "LINK_UP"; action "/sbin/ifconfig lagg0 laggport $subsystem -laggport wlan0 && /sbin/ifconfig wlan0 down"; }; notify 100 { match "system" "IFNET"; match "subsystem" "ue0"; match "type" "LINK_DOWN"; action "/sbin/ifconfig lagg0 laggport wlan0 && /sbin/ifconfig wlan0 up"; }; =3D=3D=3D The workaroud (switchover from axge to cdce) is done very quickly: =3D=3D=3D Mar 10 19:26:28 beastie kernel: ugen1.7: at usbus1 Mar 10 19:26:28 beastie kernel: axge0 on uhub5 Mar 10 19:26:28 beastie kernel: axge0: on usbus1 Mar 10 19:26:28 beastie kernel: axge0: at uhub5, port 4, addr 33 (disconnec= ted) Mar 10 19:26:29 beastie kernel: axge0: attaching PHYs failed Mar 10 19:26:29 beastie kernel: axge0: detached Mar 10 19:26:29 beastie kernel: cdce0 on uhub5 Mar 10 19:26:29 beastie kernel: cdce0: on usbus1 Mar 10 19:26:29 beastie kernel: ue0: on cdce0 Mar 10 19:26:29 beastie kernel: ue0: Ethernet address: 20:7b:d2:32:4f:a6 =3D=3D=3D and works with decent (for my use case) performance: =3D=3D=3D ~ =C2=BB speedtest Speedtest by Ookla Server: xxxx - xxxx (id: 6088) ISP: xxxxxxx Net Idle Latency: 1.27 ms (jitter: 0.04ms, low: 1.24ms, high: 1.34ms) Download: 195.24 Mbps (data used: 295.3 MB)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 1.61 ms (jitter: 4.53ms, low: 1.14ms, high: 245.98ms) Upload: 194.79 Mbps (data used: 277.4 MB)=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 2.26 ms (jitter: 9.39ms, low: 1.26ms, high: 260.40ms) Packet Loss: 0.0% =3D=3D=3D Hope that helps to workaround the issue until the up/down flapping is fixed normally --=20 You are receiving this mail because: You are the assignee for the bug.=