cvs commit: src/sys/dev/bge if_bge.c

Bill Paul wpaul at
Thu Sep 16 21:58:18 PDT 2004

wpaul       2004-09-17 04:58:17 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/bge          if_bge.c 
  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

More information about the cvs-src mailing list