- Factor out bge_{disable,enable}_intr().
commit91a98f9b95db4eb5e4b65cbd778676493ac9f71f
authorsephe <sephe>
Fri, 22 Jun 2007 15:26:18 +0000 (22 15:26 +0000)
committersephe <sephe>
Fri, 22 Jun 2007 15:26:18 +0000 (22 15:26 +0000)
tree7fbe4b327e3740d5f895af0d84c0b378c39a091e
parentf44b871e0304c8fcd8972e3c7b605ff47336517d
- 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