From nobody Sat Sep 18 17:32:56 2021 X-Original-To: bugs@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 E27DD17D4DF1 for ; Sat, 18 Sep 2021 17:32:56 +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 4HBdFN5wh0z3H1T for ; Sat, 18 Sep 2021 17:32:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 AB65B6297 for ; Sat, 18 Sep 2021 17:32:56 +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 18IHWuj4078720 for ; Sat, 18 Sep 2021 17:32:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 18IHWuHG078719 for bugs@FreeBSD.org; Sat, 18 Sep 2021 17:32:56 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: bugs@FreeBSD.org Subject: [Bug 258580] vte(4): restore MDC clock speed register value after MAC reset Date: Sat, 18 Sep 2021 17:32:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vezhlys@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258580 Bug ID: 258580 Summary: vte(4): restore MDC clock speed register value after MAC reset Product: Base System Version: CURRENT Hardware: i386 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: vezhlys@gmail.com Created attachment 227988 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D227988&action= =3Dedit if_vte.c patch Hi, On some Vortex86 SoCs MDC speed control register needs to be restored to original value after MAC reset. This issue happens if MAC has non default VTE_MDCSC register value before reset, and it is erroneously set to default after, thus causing certain PHY registers fail to be read. Since PHY regist= ers determine link status, the link is never established (ifconfig media shows "none" value). Also, one obvious sign is incorrect (not RDC) oui value in dmesg. Initially, I found and fixed that in NetBSD, but it affects all BSDs and Li= nux. Patch is already applied on NetBSD (http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/if_vte.c.diff?r1=3D1.3= 1&r2=3D1.32) and Linux (https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id= =3De3f0cc1a945fcefec0c7c9d9dfd028a51daa1846). Sending exactly the same patch for FreeBSD. For more info and my debugging history can be found in http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D53494 thread. I tested the patch on my affected Vortex86DX3 based system (link is established/oui is correct), and unaffected DX2, EX2 based machines on Free= BSD (the patch itself was tested by few more people in NetBSD/Linux too). --=20 You are receiving this mail because: You are the assignee for the bug.=