src/dpdk/drivers/net/bnx2x/bnx2x.c
static int bnx2x_nic_unload_no_mcp(struct bnx2x_softc *sc)
{
	int port = SC_PORT(sc);
	int path = SC_PATH(sc);

	PMD_DRV_LOG(INFO, sc, "NO MCP - load counts[%d]      %d, %d, %d",
		    path, load_count[path][0], load_count[path][1],
		    load_count[path][2]);
	load_count[path][0]--;
	load_count[path][1 + port]--;
	PMD_DRV_LOG(INFO, sc, "NO MCP - new load counts[%d]  %d, %d, %d",
		    path, load_count[path][0], load_count[path][1],
		    load_count[path][2]);
	if (load_count[path][0] == 0) {
		return FW_MSG_CODE_DRV_UNLOAD_COMMON;
	} else if (load_count[path][1 + port] == 0) {
		return FW_MSG_CODE_DRV_UNLOAD_PORT;
	} else {
		return FW_MSG_CODE_DRV_UNLOAD_FUNCTION;
	}
}
/* returns the "mcp load_code" according to global load_count array */
returns the "mcp load_code" according to global load_count array
returns the " mcp load_code " according to global load_count array
static int bnx2x_nic_unload_no_mcp(struct bnx2x_softc *sc)
{
	int port = SC_PORT(sc);
	int path = SC_PATH(sc);
	PMD_DRV_LOG(INFO, sc, "NO MCP - load counts[%d]      %d, %d, %d",
		    path, load_count[path][0], load_count[path][1],
		    load_count[path][2]);
	load_count[path][0]--;
	load_count[path][1 + port]--;
	PMD_DRV_LOG(INFO, sc, "NO MCP - new load counts[%d]  %d, %d, %d",
		    path, load_count[path][0], load_count[path][1],
		    load_count[path][2]);
	if (load_count[path][0] == 0) {
		return FW_MSG_CODE_DRV_UNLOAD_COMMON;
	} else if (load_count[path][1 + port] == 0) {
		return FW_MSG_CODE_DRV_UNLOAD_PORT;
	} else {
		return FW_MSG_CODE_DRV_UNLOAD_FUNCTION;
	}
}
static int bnx2x_nic_unload_no_mcp ( struct bnx2x_softc * sc ) { int port = SC_PORT ( sc ) ; int path = SC_PATH ( sc ) ; PMD_DRV_LOG ( INFO , sc , " " , path , load_count [ path ] [ 0 ] , load_count [ path ] [ 1 ] , load_count [ path ] [ 2 ] ) ; load_count [ path ] [ 0 ] -- ; load_count [ path ] [ 1 + port ] -- ; PMD_DRV_LOG ( INFO , sc , " " , path , load_count [ path ] [ 0 ] , load_count [ path ] [ 1 ] , load_count [ path ] [ 2 ] ) ; if ( load_count [ path ] [ 0 ] == 0 ) { return FW_MSG_CODE_DRV_UNLOAD_COMMON ; } else if ( load_count [ path ] [ 1 + port ] == 0 ) { return FW_MSG_CODE_DRV_UNLOAD_PORT ; } else { return FW_MSG_CODE_DRV_UNLOAD_FUNCTION ; } }
returns the "mcp load_code" according to global load_count array
returns the " mcp load_code " according to global load_count array