FreeBSD/sys/dev/bxe/bxe.c
/* get the load status for an engine, should be run under rtnl lock */
get the load status for an engine, should be run under rtnl lock
get the load status for an engine should be run under rtnl lock
static uint8_t
bxe_get_load_status(struct bxe_softc *sc,
                    int              engine)
{
    uint32_t mask = engine ? BXE_PATH1_LOAD_CNT_MASK :
                             BXE_PATH0_LOAD_CNT_MASK;
    uint32_t shift = engine ? BXE_PATH1_LOAD_CNT_SHIFT :
                              BXE_PATH0_LOAD_CNT_SHIFT;
    uint32_t val = REG_RD(sc, BXE_RECOVERY_GLOB_REG);
    BLOGD(sc, DBG_LOAD, "Old value for GLOB_REG=0x%08x\n", val);
    val = ((val & mask) >> shift);
    BLOGD(sc, DBG_LOAD, "Load mask engine %d = 0x%08x\n", engine, val);
    return (val != 0);
}
static uint8_t bxe_get_load_status ( struct bxe_softc * sc , int engine ) { uint32_t mask = engine ? BXE_PATH1_LOAD_CNT_MASK : BXE_PATH0_LOAD_CNT_MASK ; uint32_t shift = engine ? BXE_PATH1_LOAD_CNT_SHIFT : BXE_PATH0_LOAD_CNT_SHIFT ; uint32_t val = REG_RD ( sc , BXE_RECOVERY_GLOB_REG ) ; BLOGD ( sc , DBG_LOAD , " \n " , val ) ; val = ( ( val & mask ) >> shift ) ; BLOGD ( sc , DBG_LOAD , " \n " , engine , val ) ; return ( val != 0 ) ; }
get the load status for an engine, should be run under rtnl lock
get the load status for an engine should be run under rtnl lock