1 /* $OpenBSD: igc_api.h,v 1.1 2021/10/31 14:52:57 patrick Exp $ */ 2 /*- 3 * Copyright 2021 Intel Corp 4 * Copyright 2021 Rubicon Communications, LLC (Netgate) 5 * SPDX-License-Identifier: BSD-3-Clause 6 * 7 * $FreeBSD$ 8 */ 9 10 #ifndef _IGC_API_H_ 11 #define _IGC_API_H_ 12 13 #include <dev/pci/if_igc.h> 14 #include <dev/pci/igc_hw.h> 15 16 extern void igc_init_function_pointers_i225(struct igc_hw *); 17 18 int igc_set_mac_type(struct igc_hw *); 19 int igc_setup_init_funcs(struct igc_hw *, bool); 20 int igc_init_mac_params(struct igc_hw *); 21 int igc_init_nvm_params(struct igc_hw *); 22 int igc_init_phy_params(struct igc_hw *); 23 int igc_get_bus_info(struct igc_hw *); 24 void igc_clear_vfta(struct igc_hw *); 25 void igc_write_vfta(struct igc_hw *, uint32_t, uint32_t); 26 int igc_force_mac_fc(struct igc_hw *); 27 int igc_check_for_link(struct igc_hw *); 28 int igc_reset_hw(struct igc_hw *); 29 int igc_init_hw(struct igc_hw *); 30 int igc_setup_link(struct igc_hw *); 31 int igc_get_speed_and_duplex(struct igc_hw *, uint16_t *, 32 uint16_t *); 33 int igc_disable_pcie_master(struct igc_hw *); 34 void igc_config_collision_dist(struct igc_hw *); 35 int igc_rar_set(struct igc_hw *, uint8_t *, uint32_t); 36 uint32_t igc_hash_mc_addr(struct igc_hw *, uint8_t *); 37 void igc_update_mc_addr_list(struct igc_hw *, uint8_t *, uint32_t); 38 int igc_check_reset_block(struct igc_hw *); 39 int igc_get_cable_length(struct igc_hw *); 40 int igc_validate_mdi_setting(struct igc_hw *); 41 int igc_get_phy_info(struct igc_hw *); 42 int igc_phy_hw_reset(struct igc_hw *); 43 int igc_phy_commit(struct igc_hw *); 44 void igc_power_up_phy(struct igc_hw *); 45 void igc_power_down_phy(struct igc_hw *); 46 int igc_read_mac_addr(struct igc_hw *); 47 int igc_read_pba_string(struct igc_hw *, uint8_t *, uint32_t); 48 void igc_reload_nvm(struct igc_hw *); 49 int igc_validate_nvm_checksum(struct igc_hw *); 50 int igc_read_nvm(struct igc_hw *, uint16_t, uint16_t, uint16_t *); 51 int igc_write_nvm(struct igc_hw *, uint16_t, uint16_t, uint16_t *); 52 int igc_set_d3_lplu_state(struct igc_hw *, bool); 53 int igc_set_d0_lplu_state(struct igc_hw *, bool); 54 55 #endif /* _IGC_API_H_ */ 56