Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Sep 2004 04:58:17 +0000 (UTC)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/bge if_bge.c
Message-ID:  <200409170458.i8H4wHxh064625@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       2004-09-17 04:58:17 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  Log:
  Commit patch to supress spurious link change events. Apparently, with
  copper NICs, a link change event is posted whenever MII autopolling is
  toggled off and on, which happens whenever someone calls
  bge_miibus_readreg() or bge_miibus_writereg() to access the PHY
  registers. This means anytime someone called the SIOCGIFMEDIA ioctl
  on a bge interface, the link would reset. Even a simple "ifconfig bge0"
  would do it, though other apps like dhclient or the PPPoE daemon could
  trigger it as well. An obvious symptom of this problem is lots of
  "bgeX: gigabit link up" messages appearing on the console for no
  apparent reason.
  
  Through experimentation, I determined that when a real link change
  event occurs, the BGE_MIMODE_AUTOPOLL in the BGE_MI_MODE register
  is always set, so now if we have a copper NIC and an link change
  event occurs and the BGE_MIMODE_AUTOPOLL bit is clear, we ignore
  the event.
  
  Note that this does not apply to the original BCM5700 chip since we
  use a different method for sensing link changes with that chip (the
  status block method was broken), nor to fiber optic NICs since they
  don't use the GMII PHY access registers.
  
  Revision  Changes    Path
  1.73      +11 -2     src/sys/dev/bge/if_bge.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409170458.i8H4wHxh064625>