for (i = 0; i < filter->table_max_len; i++) if (!is_zero_ether_addr(filter->mac_table[i].addr)) {
addr = ether_addr_to_u64(filter->mac_table[i].addr);
hbg_hw_set_uc_addr(priv, addr, i);
}
staticvoid hbg_restore_user_def_settings(struct hbg_priv *priv)
{ /* The index of host mac is always 0. */
u64 rx_pause_addr = ether_addr_to_u64(priv->filter.mac_table[0].addr); struct ethtool_pauseparam *pause_param = &priv->user_def.pause_param;
staticint hbg_reset_prepare(struct hbg_priv *priv, enum hbg_reset_type type)
{ int ret;
if (test_and_set_bit(HBG_NIC_STATE_RESETTING, &priv->state)) return -EBUSY;
if (netif_running(priv->netdev)) {
clear_bit(HBG_NIC_STATE_RESETTING, &priv->state);
dev_warn(&priv->pdev->dev, "failed to reset because port is up\n"); return -EBUSY;
}
netif_device_detach(priv->netdev);
priv->reset_type = type;
clear_bit(HBG_NIC_STATE_RESET_FAIL, &priv->state);
ret = hbg_hw_event_notify(priv, HBG_HW_EVENT_RESET); if (ret) {
priv->stats.reset_fail_cnt++;
set_bit(HBG_NIC_STATE_RESET_FAIL, &priv->state);
clear_bit(HBG_NIC_STATE_RESETTING, &priv->state);
}
return ret;
}
staticint hbg_reset_done(struct hbg_priv *priv, enum hbg_reset_type type)
{ int ret;
if (!test_bit(HBG_NIC_STATE_RESETTING, &priv->state) ||
type != priv->reset_type) return 0;
ret = hbg_rebuild(priv); if (ret) {
priv->stats.reset_fail_cnt++;
set_bit(HBG_NIC_STATE_RESET_FAIL, &priv->state);
clear_bit(HBG_NIC_STATE_RESETTING, &priv->state);
dev_err(&priv->pdev->dev, "failed to rebuild after reset\n"); return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.