bge: Enable "tagged status" on non-BCM5788 and non-BCM5700 chips
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 3 Jul 2012 09:39:58 +0000 (17:39 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 4 Jul 2012 02:46:46 +0000 (10:46 +0800)
commit90ad1c96cd956eb8f29df6e311d6025596ab43de
treeb50955e3efcab32c5b9d65d22dfd3a942c99d7a4
parent4cda7147e5c08aeaba39cefffe91d62772a9dac7
bge: Enable "tagged status" on non-BCM5788 and non-BCM5700 chips

By using "tagged status", we could:
- Detect whether the interrupt is for us or not.
- Avoid MAC_STS register read upon every interrupt.

Some implementation note:
- Interrupt must be disabled during interrupt handing, if "tagged status"
  is used, else the interrupt will be kept asserted.  This is the case at
  least on BCM5750 AX/BX.
- Coalesce parameters during interrupt must be properly configured; when
  "tagged status" is used we have "in interrupt" state.

Tunable hw.bgeX.status_tag is added to prevent driver from using "tagged
status".  hw.bgeX.{rx,tx}_coal_bds_int and hw.bgeX.{rx,tx}_coal_ticks_int
sysctls are added to tune "in interrupt" coalesce parameters.
sys/dev/netif/bge/if_bge.c
sys/dev/netif/bge/if_bgereg.h