FreeBSD/sys/dev/bxe/bxe.c
/*
 * Cleans the object that have internal lists without sending
 * ramrods. Should be run when interrutps are disabled.
 */
Cleans the object that have internal lists without sending
ramrods. Should be run when interrutps are disabled.
Cleans the object that have internal lists without sending ramrods . Should be run when interrutps are disabled .
static void
bxe_squeeze_objects(struct bxe_softc *sc)
{
    unsigned long ramrod_flags = 0, vlan_mac_flags = 0;
    struct ecore_mcast_ramrod_params rparam = { NULL };
    struct ecore_vlan_mac_obj *mac_obj = &sc->sp_objs->mac_obj;
    int rc;
    bxe_set_bit(RAMROD_COMP_WAIT, &ramrod_flags);
    bxe_set_bit(RAMROD_DRV_CLR_ONLY, &ramrod_flags);
    bxe_set_bit(ECORE_ETH_MAC, &vlan_mac_flags);
    rc = mac_obj->delete_all(sc, &sc->sp_objs->mac_obj, &vlan_mac_flags,
                             &ramrod_flags);
    if (rc != 0) {
        BLOGE(sc, "Failed to clean ETH MACs (%d)\n", rc);
    }
    vlan_mac_flags = 0;
    bxe_set_bit(ECORE_UC_LIST_MAC, &vlan_mac_flags);
    rc = mac_obj->delete_all(sc, mac_obj, &vlan_mac_flags,
                             &ramrod_flags);
    if (rc != 0) {
        BLOGE(sc, "Failed to clean UC list MACs (%d)\n", rc);
    }
    rparam.mcast_obj = &sc->mcast_obj;
    bxe_set_bit(RAMROD_DRV_CLR_ONLY, &rparam.ramrod_flags);
    rc = ecore_config_mcast(sc, &rparam, ECORE_MCAST_CMD_DEL);
    if (rc < 0) {
        BLOGE(sc, "Failed to send DEL MCAST command (%d)\n", rc);
    }
    rc = ecore_config_mcast(sc, &rparam, ECORE_MCAST_CMD_CONT);
    while (rc != 0) {
        if (rc < 0) {
            BLOGE(sc, "Failed to clean MCAST object (%d)\n", rc);
            return;
        }
        rc = ecore_config_mcast(sc, &rparam, ECORE_MCAST_CMD_CONT);
    }
}
static void bxe_squeeze_objects ( struct bxe_softc * sc ) { unsigned long ramrod_flags = 0 , vlan_mac_flags = 0 ; struct ecore_mcast_ramrod_params rparam = { NULL } ; struct ecore_vlan_mac_obj * mac_obj = & sc -> sp_objs -> mac_obj ; int rc ; bxe_set_bit ( RAMROD_COMP_WAIT , & ramrod_flags ) ; bxe_set_bit ( RAMROD_DRV_CLR_ONLY , & ramrod_flags ) ; bxe_set_bit ( ECORE_ETH_MAC , & vlan_mac_flags ) ; rc = mac_obj -> delete_all ( sc , & sc -> sp_objs -> mac_obj , & vlan_mac_flags , & ramrod_flags ) ; if ( rc != 0 ) { BLOGE ( sc , " \n " , rc ) ; } vlan_mac_flags = 0 ; bxe_set_bit ( ECORE_UC_LIST_MAC , & vlan_mac_flags ) ; rc = mac_obj -> delete_all ( sc , mac_obj , & vlan_mac_flags , & ramrod_flags ) ; if ( rc != 0 ) { BLOGE ( sc , " \n " , rc ) ; } rparam . mcast_obj = & sc -> mcast_obj ; bxe_set_bit ( RAMROD_DRV_CLR_ONLY , & rparam . ramrod_flags ) ; rc = ecore_config_mcast ( sc , & rparam , ECORE_MCAST_CMD_DEL ) ; if ( rc < 0 ) { BLOGE ( sc , " \n " , rc ) ; } rc = ecore_config_mcast ( sc , & rparam , ECORE_MCAST_CMD_CONT ) ; while ( rc != 0 ) { if ( rc < 0 ) { BLOGE ( sc , " \n " , rc ) ; return ; } rc = ecore_config_mcast ( sc , & rparam , ECORE_MCAST_CMD_CONT ) ; } }
Cleans the object that have internal lists without sending
 ramrods.
Cleans the object that have internal lists without sending ramrods .
/* Cleanup MACs' object first... */ /* Wait for completion of requested */ /* Perform a dry cleanup */ /* Clean ETH primary MAC */ /* Cleanup UC list */ /* Now clean mcast object... */ /* Add a DEL command... */ /* now wait until all pending commands are cleared */