FreeBSD/sys/dev/bxe/bxe.c
/* acquire split MCP access lock register */
acquire split MCP access lock register
acquire split MCP access lock register
static int bxe_acquire_alr(struct bxe_softc *sc)
{
    uint32_t j, val;
    for (j = 0; j < 1000; j++) {
        val = (1UL << 31);
        REG_WR(sc, GRCBASE_MCP + 0x9c, val);
        val = REG_RD(sc, GRCBASE_MCP + 0x9c);
        if (val & (1L << 31))
            break;
        DELAY(5000);
    }
    if (!(val & (1L << 31))) {
        BLOGE(sc, "Cannot acquire MCP access lock register\n");
        return (-1);
    }
    return (0);
}
static int bxe_acquire_alr ( struct bxe_softc * sc ) { uint32_t j , val ; for ( j = 0 ; j < 1000 ; j ++ ) { val = ( 1UL << 31 ) ; REG_WR ( sc , GRCBASE_MCP + 0x9c , val ) ; val = REG_RD ( sc , GRCBASE_MCP + 0x9c ) ; if ( val & ( 1L << 31 ) ) break ; DELAY ( 5000 ) ; } if ( ! ( val & ( 1L << 31 ) ) ) { BLOGE ( sc , " \n " ) ; return ( -1 ) ; } return ( 0 ) ; }
acquire split MCP access lock register
acquire split MCP access lock register