- Factor out bge_{disable,enable}_intr().
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Jun 2007 15:26:18 +0000 (15:26 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Jun 2007 15:26:18 +0000 (15:26 +0000)
commitba39cc82eeeb8ea145deb86565cbdec364a780f7
treef56f17373f51f55a948cc788981e22f65cc93e2b
parent94c0a26490245596469971e2cbc3535df399839d
- Factor out bge_{disable,enable}_intr().
- In bge_enable_intr(), trigger another hardware interrupt after clearing
  interrupt mask, since any writing to BGE_MBX_IRQ0_LO will acknowledge
  interrupts.  Add comment about it.
- In bge_disable_intr(), acknowledge and disable interrupt by writing 1 to
  BGE_MBX_IRQ0_LO, since setting interrupt mask itself does not de-assert
  a currently asserted interrupt.  Add comment about it.
- Since we have explicitly disabled interrupt using BGE_MBX_IRQ0_LO, set
  "RX/TX coalesced BD count during interrupt" to 1.  In this way, RX/TX
  coalescing engine will properly update status block, which contains RX/TX
  descriptor index.  This only affects polling(4) operation, since we don't
  have a "during interrupt" period in our interrupt handler.
- Fix comment.

Tested-with: 5751, 5701(altima)
sys/dev/netif/bge/if_bge.c