CVSROOT: /cvs Module name: src Changes by: jmatt...@cvs.openbsd.org 2015/11/28 02:42:10
Modified files: sys/dev/ic : gem.c gemvar.h sys/dev/pci : if_gem_pci.c sys/dev/sbus : if_gem_sbus.c Log message: Rework gem_start to check that there's enough space in the ring before dequeueing a packet, then drop the packet if it can't be sent, rather than using two phase dequeue then commit. Adjust sc_tx_cnt using atomic operations, take the kernel lock before calling gem_start or gem_init from the interrupt handler, and use an interrupt barrier when taking the interface down. With all this done, we can mark the interrupt handler for pci (but not sbus) attached gem(4) as mpsafe. mpi@ wrote this initially, I fixed bugs to keep sparc64 happy and kept it up to date with ifq changes. ok mpi@ dlg@