Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/32a9b3fc1f37
branches:  netbsd-9
changeset: 940743:32a9b3fc1f37
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Oct 16 08:03:36 2020 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1114):

        sys/dev/pci/if_wm.c: revision 1.691

  Fixes a problem that the attach function reported
"wm_gmii_setup_phytype: Unknown PHY model. OUI=000000, model=0000" and
"PHY type is still unknown." Don't call wm_gmii_setup_phytype() three times if
the interface uses SGMII with internal MDIO.

  Tested with I354(Rangeley(SGMII(MDIO))) and I350(SERDES(SFP), SGMII(SFP)).

diffstat:

 sys/dev/pci/if_wm.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 40604d023986 -r 32a9b3fc1f37 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Thu Oct 15 19:39:02 2020 +0000
+++ b/sys/dev/pci/if_wm.c       Fri Oct 16 08:03:36 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.645.2.7 2020/09/23 08:46:54 martin Exp $   */
+/*     $NetBSD: if_wm.c,v 1.645.2.8 2020/10/16 08:03:36 martin Exp $   */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.7 2020/09/23 08:46:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.8 2020/10/16 08:03:36 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2860,7 +2860,8 @@
                        reg &= ~CTRL_EXT_I2C_ENA;
                CSR_WRITE(sc, WMREG_CTRL_EXT, reg);
                if ((sc->sc_flags & WM_F_SGMII) != 0) {
-                       wm_gmii_setup_phytype(sc, 0, 0);
+                       if (!wm_sgmii_uses_mdio(sc))
+                               wm_gmii_setup_phytype(sc, 0, 0);
                        wm_reset_mdicnfg_82580(sc);
                }
        } else if (sc->sc_type < WM_T_82543 ||



Home | Main Index | Thread Index | Old Index