ice_aq_write_i2c(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ice_aq_write_i2c(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, welcome to the ice_aq_write_i2c page from the Kernel API Manual, and no cap, this little function is the one that actually writes stuff out over I2C. she's giving "quiet achiever," she's giving "0x06E3 energy," and honestly? obsessed. let's get into it πŸŽ€


πŸ¦‹ NAME πŸ¦‹

ice_aq_write_i2c β€” bestie, it writes to an I2C device. that's the whole personality. periodt. πŸ’–


✨ SYNOPSIS ✨

int ice_aq_write_i2c (struct ice_hw *hw , struct ice_aqc_link_topo_addr
topo_addr , u16 bus_addr , __le16 addr , u8 params , const u8 *data ,
struct ice_sq_cd *cd );

like, that's the whole signature β€” copy it exactly, don't be weird about it 🫢


🌸 ARGUMENTS 🌸

  • hw β€” pointer to the hw struct. your main character struct, iykyk πŸ‘‘
  • topo_addr β€” the topology address for a device to communicate with. it's literally the address of who you're talking to πŸ¦‹
  • bus_addr β€” a 7-bit I2C bus address ✨ (yes, seven. count them.)
  • addr β€” the I2C memory address (aka the I2C offset), and it holds up to 16 bits πŸ’…
  • params β€” the I2C parameters, and bestie she is packed:
    • bit [4] β€” the I2C address type
    • bits [3:0] β€” the data size to write (0–7 bytes)
  • data β€” pointer to the data (0 to 4 bytes) that's getting written to the I2C device πŸ“
  • cd β€” pointer to the command details structure, or NULL. dealer's choice 😌

πŸ”₯ DESCRIPTION πŸ”₯

Write I2C (0x06E3)

that's it, that's the vibe. she writes, she slays, she moves on πŸ’€βœ¨


πŸ’œ RETURN πŸ’œ

like, she will tell you exactly how it went:

  • 0 β€” successful write to the i2c device πŸŽ‰ slay!!
  • -EINVAL β€” data size greater than 4 bytes 🚩 nah bestie, too much data, hard pass
  • -EIO β€” FW error 😭 the firmware said no

🌈 SEE ALSO 🌈

bestie. sit down. hydrate. this list is long and we are reading all of it, no skimming πŸ™ˆ

first, the kernel file itself:

  • Kernel file ./drivers/net/ethernet/intel/ice/ice_common.c

and now the extended family 🫢

ice_dump_phy_type(9), ice_set_mac_type(9), ice_is_generic_mac(9), ice_clear_pf_cfg(9), ice_aq_manage_mac_read(9), ice_aq_get_phy_caps(9), ice_aq_get_link_topo_handle(9), ice_aq_get_netlist_node(9), ice_find_netlist_node(9), ice_is_media_cage_present(9), ice_get_media_type(9), ice_get_link_status_datalen(9), ice_aq_get_link_info(9), ice_fill_tx_timer_and_fc_thresh(9), ice_aq_set_mac_cfg(9), ice_init_fltr_mgmt_struct(9), ice_cleanup_fltr_mgmt_struct(9), ice_get_itr_intrl_gran(9), ice_wait_fw_load(9), ice_init_hw(9), ice_deinit_hw(9), ice_check_reset(9), ice_pf_reset(9), ice_reset(9), ice_copy_rxq_ctx_to_hw(9), ice_copy_rxq_ctx_from_hw(9), ice_pack_rxq_ctx(9), ice_unpack_rxq_ctx(9), ice_write_rxq_ctx(9), ice_read_rxq_ctx(9), ice_pack_txq_ctx(9), ice_pack_txq_ctx_full(9), ice_unpack_txq_ctx_full(9), ice_copy_txq_ctx_from_hw(9), ice_copy_txq_ctx_to_hw(9), ice_read_txq_ctx(9), ice_write_txq_ctx(9), ice_pack_txtime_ctx(9), ice_sbq_send_cmd(9), ice_sbq_rw_reg(9), ice_should_retry_sq_send_cmd(9), ice_sq_send_cmd_retry(9), ice_aq_send_cmd(9), ice_aq_get_fw_ver(9), ice_aq_send_driver_ver(9), ice_aq_q_shutdown(9), ice_aq_req_res(9), ice_aq_release_res(9), ice_acquire_res(9), ice_release_res(9), ice_aq_alloc_free_res(9), ice_alloc_hw_res(9), ice_free_hw_res(9), ice_get_num_per_func(9), ice_parse_common_caps(9), ice_recalc_port_limited_caps(9), ice_parse_vf_func_caps(9), ice_parse_vsi_func_caps(9), ice_parse_1588_func_caps(9), ice_parse_fdir_func_caps(9), ice_parse_func_caps(9), ice_func_id_to_logical_id(9), ice_parse_valid_functions_cap(9), ice_parse_vf_dev_caps(9), ice_parse_vsi_dev_caps(9), ice_parse_1588_dev_caps(9), ice_parse_fdir_dev_caps(9), ice_parse_sensor_reading_cap(9), ice_parse_nac_topo_dev_caps(9), ice_parse_dev_caps(9), ice_is_phy_rclk_in_netlist(9), ice_is_clock_mux_in_netlist(9), ice_is_cgu_in_netlist(9), ice_is_gps_in_netlist(9), ice_aq_list_caps(9), ice_discover_dev_caps(9), ice_discover_func_caps(9), ice_set_safe_mode_caps(9), ice_get_caps(9), ice_aq_manage_mac_write(9), ice_aq_clear_pxe_mode(9), ice_clear_pxe_mode(9), ice_aq_set_port_params(9), ice_is_100m_speed_supported(9), ice_get_link_speed_based_on_phy_type(9), ice_update_phy_type(9), ice_aq_set_phy_cfg(9), ice_update_link_info(9), ice_aq_get_phy_equalization(9), ice_aq_get_fec_stats(9), ice_cache_phy_user_req(9), ice_caps_to_fc_mode(9), ice_caps_to_fec_mode(9), ice_cfg_phy_fc(9), ice_set_fc(9), ice_phy_caps_equals_cfg(9), ice_copy_phy_caps_to_cfg(9), ice_cfg_phy_fec(9), ice_get_link_status(9), ice_aq_set_link_restart_an(9), ice_aq_set_event_mask(9), ice_aq_set_mac_loopback(9), ice_aq_set_port_id_led(9), ice_aq_get_port_options(9), ice_aq_set_port_option(9), ice_get_phy_lane_number(9), ice_aq_sff_eeprom(9), __ice_aq_get_set_rss_lut(9), ice_aq_get_rss_lut(9), ice_aq_set_rss_lut(9), __ice_aq_get_set_rss_key(9), ice_aq_get_rss_key(9), ice_aq_set_rss_key(9), ice_aq_add_lan_txq(9), ice_aq_dis_lan_txq(9), ice_aq_cfg_lan_txq(9), ice_aq_add_rdma_qsets(9), ice_aq_set_txtimeq(9), ice_get_lan_q_ctx(9), ice_ena_vsi_txq(9), ice_dis_vsi_txq(9), ice_cfg_vsi_qs(9), ice_cfg_vsi_lan(9), ice_cfg_vsi_rdma(9), ice_ena_vsi_rdma_qset(9), ice_dis_vsi_rdma_qset(9), ice_aq_get_cgu_input_pin_measure(9), ice_aq_get_cgu_abilities(9), ice_aq_set_input_pin_cfg(9), ice_aq_get_input_pin_cfg(9), ice_aq_set_output_pin_cfg(9), ice_aq_get_output_pin_cfg(9), ice_aq_get_cgu_dpll_status(9), ice_aq_set_cgu_dpll_config(9), ice_aq_set_cgu_ref_prio(9), ice_aq_get_cgu_ref_prio(9), ice_aq_get_cgu_info(9), ice_aq_set_phy_rec_clk_out(9), ice_aq_get_phy_rec_clk_out(9), ice_aq_get_sensor_reading(9), ice_replay_pre_init(9), ice_replay_vsi(9), ice_replay_post(9), ice_stat_update40(9), ice_stat_update32(9), ice_sched_query_elem(9), ice_aq_read_i2c(9), ice_get_pca9575_handle(9), ice_read_pca9575_reg(9), ice_aq_set_gpio(9), ice_aq_get_gpio(9), ice_is_fw_api_min_ver(9), ice_fw_supports_link_override(9), ice_get_link_default_override(9), ice_is_phy_caps_an_enabled(9), ice_is_fw_health_report_supported(9), ice_aq_set_health_status_cfg(9), ice_aq_set_lldp_mib(9), ice_fw_supports_lldp_fltr_ctrl(9), ice_lldp_fltr_add_remove(9), ice_lldp_execute_pending_mib(9), ice_fw_supports_report_dflt_cfg(9), ice_get_link_speed(9), ice_get_dest_cgu(9), ice_read_cgu_reg(9), ice_write_cgu_reg(9)

okay that was a lot but we did it, we ate and left no crumbs πŸ”₯πŸ‘‘

btw if you ever write more than 4 bytes of data, that's an -EINVAL and the kernel is gonna look at you like πŸ’€ so like, don't do that. params says 0–7 for the size field but the return value says >4 bytes is a no β€” both are true, they're just different layers of the story, bestie πŸ™ˆ

and that's the page!! sourced from ./drivers/net/ethernet/intel/ice, dated October 2026, part of the Kernel API Manual, function ice_aq_write_i2c(9) β€” ty for coming to my ted talk, mwah, ilysm πŸ«ΆπŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from