]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r213522,213587,213711:
authoryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 2 Nov 2010 23:48:08 +0000 (23:48 +0000)
committeryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 2 Nov 2010 23:48:08 +0000 (23:48 +0000)
commitf417f94a1640ef60fdcdd527445308b680477482
tree24db4076ec24b00f17f1a8218b2907c8bf7d221f
parentc46c8ac8d906748d8d067d993547767da47a5075
MFC r213522,213587,213711:
r213522:
  Fix a long standing bug which regarded some revisions of controller
  as 5788. This caused BGE_MISC_LOCAL_CTL register is used to
  generate link state change interrupt for non-5788 controllers. The
  interrupt handler may or may not detect link state attention as
  status block wouldn't be updated when an interrupt was generated
  with BGE_MISC_LOCAL_CTL register. All controllers except 5700 and
  5788 should use host coalescing mode register to trigger an
  interrupt.

r213587:
  Do not blindly UP the interface when interface's MTU is changed. If
  driver is not running there is no need to up the interface. While
  I'm here hold driver lock before modifying MTU as it is referenced
  in RX handler.

r213711:
  The IFF_DRV_RUNNING flag is set at the end of bge_init_locked. But
  before setting the flag, interrupt was already enabled such that
  interrupt handler could be run before setting IFF_DRV_RUNNING flag.
  This can lose initial link state change interrupt which in turn
  make bge(4) think that it still does not have valid link. Fix this
  race by protecting the taskqueue with a driver lock.
  While I'm here move reenabling interrupt code after handling of link
  state chage.

  Reviewed by: davidch

git-svn-id: svn://svn.freebsd.org/base/stable/8@214710 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/bge/if_bge.c