o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite   some time now so collapse calls accordingly. o Given that gem_load_txmbuf() is allowed to fail resulting in a packet   drop also for quite some time now implement the functionality of   gem_txcksum() by means of m_pullup(9), which de-obfuscates the code   and allows to always retrieve the correct length of the IP header. o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in   gem_rint() and gem_start_locked(). o Correct some bus_barrier(9) calls to do a read/write barrier as we   do a read after a write. Add some missing ones in gem_mii_readreg()   and gem_mii_writereg(). o According to the Apple GMAC driver, the GEM ASIC specification and   the OpenSolaris eri(7D) the TX FIFO threshold has to be set to 0x4ff   for the Gigabit variants and 0x100 for the ERI in order do avoid TX   underruns. o In gem_init_locked():   - be conservative and enable the RX and TX MACs,   - don't clear GEM_LINK otherwise we don't ever mark the link as up     again if gem_init_locked() is called from gem_watchdog(),   - remove superfluous setting of sc_ifflags. o Don't bother to check whether the interface is running or whether its   queue is empty before calling gem_start_locked() in gem_tint(), the   former will check these anyway. o Call gem_start_locked() in gem_watchdog() in order to try to get   some more packets going. o In gem_mii_writereg() after reseting the PCS restore its configuration.
o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
  some time now so collapse calls accordingly.
o Given that gem_load_txmbuf() is allowed to fail resulting in a packet
  drop also for quite some time now implement the functionality of
  gem_txcksum() by means of m_pullup(9), which de-obfuscates the code
  and allows to always retrieve the correct length of the IP header.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
  gem_rint() and gem_start_locked().
o Correct some bus_barrier(9) calls to do a read/write barrier as we
  do a read after a write. Add some missing ones in gem_mii_readreg()
  and gem_mii_writereg().
o According to the Apple GMAC driver, the GEM ASIC specification and
  the OpenSolaris eri(7D) the TX FIFO threshold has to be set to 0x4ff
  for the Gigabit variants and 0x100 for the ERI in order do avoid TX
  underruns.
o In gem_init_locked():
  - be conservative and enable the RX and TX MACs,
  - don't clear GEM_LINK otherwise we don't ever mark the link as up
    again if gem_init_locked() is called from gem_watchdog(),
  - remove superfluous setting of sc_ifflags.
o Don't bother to check whether the interface is running or whether its
  queue is empty before calling gem_start_locked() in gem_tint(), the
  former will check these anyway.
o Call gem_start_locked() in gem_watchdog() in order to try to get
  some more packets going.
o In gem_mii_writereg() after reseting the PCS restore its configuration.

GMAC testing:	grehan, marcel
MFC after:	2 weeks

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase