Lines Matching refs:hw

40  * @hw: pointer to hardware structure
45 void ixgbe_dcb_get_rtrup2tc(struct ixgbe_hw *hw, u8 *map)
47 if (hw->mac.ops.get_rtrup2tc)
48 hw->mac.ops.get_rtrup2tc(hw, map);
53 * @hw: pointer to hardware structure
59 * hw structure should be filled in prior to calling this function:
63 s32 ixgbe_init_shared_code(struct ixgbe_hw *hw)
72 ixgbe_set_mac_type(hw);
74 switch (hw->mac.type) {
76 status = ixgbe_init_ops_82598(hw);
79 status = ixgbe_init_ops_82599(hw);
83 status = ixgbe_init_ops_vf(hw);
86 status = ixgbe_init_ops_X540(hw);
98 * @hw: pointer to the HW structure
101 * vendor ID and device ID stored in the hw structure.
103 s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
109 if (hw->vendor_id != IXGBE_INTEL_VENDOR_ID) {
111 "Unsupported vendor id: %x", hw->vendor_id);
115 switch (hw->device_id) {
128 hw->mac.type = ixgbe_mac_82598EB;
145 hw->mac.type = ixgbe_mac_82599EB;
149 hw->mac.type = ixgbe_mac_82599_vf;
153 hw->mac.type = ixgbe_mac_X540_vf;
157 hw->mac.type = ixgbe_mac_X540;
163 hw->device_id);
168 hw->mac.type, ret_val);
174 * @hw: pointer to hardware structure
178 s32 ixgbe_init_hw(struct ixgbe_hw *hw)
180 return ixgbe_call_func(hw, hw->mac.ops.init_hw, (hw),
186 * @hw: pointer to hardware structure
191 s32 ixgbe_reset_hw(struct ixgbe_hw *hw)
193 return ixgbe_call_func(hw, hw->mac.ops.reset_hw, (hw),
199 * @hw: pointer to hardware structure
207 s32 ixgbe_start_hw(struct ixgbe_hw *hw)
209 return ixgbe_call_func(hw, hw->mac.ops.start_hw, (hw),
217 * @hw: pointer to hardware structure
221 void ixgbe_enable_relaxed_ordering(struct ixgbe_hw *hw)
223 if (hw->mac.ops.enable_relaxed_ordering)
224 hw->mac.ops.enable_relaxed_ordering(hw);
229 * @hw: pointer to hardware structure
234 s32 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw)
236 return ixgbe_call_func(hw, hw->mac.ops.clear_hw_cntrs, (hw),
242 * @hw: pointer to hardware structure
246 enum ixgbe_media_type ixgbe_get_media_type(struct ixgbe_hw *hw)
248 return ixgbe_call_func(hw, hw->mac.ops.get_media_type, (hw),
254 * @hw: pointer to hardware structure
262 s32 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr)
264 return ixgbe_call_func(hw, hw->mac.ops.get_mac_addr,
265 (hw, mac_addr), IXGBE_NOT_IMPLEMENTED);
270 * @hw: pointer to hardware structure
276 s32 ixgbe_get_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr)
278 return ixgbe_call_func(hw, hw->mac.ops.get_san_mac_addr,
279 (hw, san_mac_addr), IXGBE_NOT_IMPLEMENTED);
284 * @hw: pointer to hardware structure
289 s32 ixgbe_set_san_mac_addr(struct ixgbe_hw *hw, u8 *san_mac_addr)
291 return ixgbe_call_func(hw, hw->mac.ops.set_san_mac_addr,
292 (hw, san_mac_addr), IXGBE_NOT_IMPLEMENTED);
297 * @hw: pointer to hardware structure
302 s32 ixgbe_get_device_caps(struct ixgbe_hw *hw, u16 *device_caps)
304 return ixgbe_call_func(hw, hw->mac.ops.get_device_caps,
305 (hw, device_caps), IXGBE_NOT_IMPLEMENTED);
310 * @hw: pointer to hardware structure
317 s32 ixgbe_get_wwn_prefix(struct ixgbe_hw *hw, u16 *wwnn_prefix,
320 return ixgbe_call_func(hw, hw->mac.ops.get_wwn_prefix,
321 (hw, wwnn_prefix, wwpn_prefix),
327 * @hw: pointer to hardware structure
332 s32 ixgbe_get_fcoe_boot_status(struct ixgbe_hw *hw, u16 *bs)
334 return ixgbe_call_func(hw, hw->mac.ops.get_fcoe_boot_status,
335 (hw, bs),
341 * @hw: pointer to hardware structure
345 s32 ixgbe_get_bus_info(struct ixgbe_hw *hw)
347 return ixgbe_call_func(hw, hw->mac.ops.get_bus_info, (hw),
353 * @hw: pointer to hardware structure
357 u32 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw)
359 return hw->mac.max_tx_queues;
364 * @hw: pointer to hardware structure
368 u32 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw)
370 return hw->mac.max_rx_queues;
375 * @hw: pointer to hardware structure
382 s32 ixgbe_stop_adapter(struct ixgbe_hw *hw)
384 return ixgbe_call_func(hw, hw->mac.ops.stop_adapter, (hw),
390 * @hw: pointer to hardware structure
396 s32 ixgbe_read_pba_string(struct ixgbe_hw *hw, u8 *pba_num, u32 pba_num_size)
398 return ixgbe_read_pba_string_generic(hw, pba_num, pba_num_size);
403 * @hw: pointer to hardware structure
408 s32 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num)
410 return ixgbe_read_pba_num_generic(hw, pba_num);
415 * @hw: pointer to hardware structure
419 s32 ixgbe_identify_phy(struct ixgbe_hw *hw)
423 if (hw->phy.type == ixgbe_phy_unknown) {
424 status = ixgbe_call_func(hw, hw->phy.ops.identify, (hw),
433 * @hw: pointer to hardware structure
435 s32 ixgbe_reset_phy(struct ixgbe_hw *hw)
439 if (hw->phy.type == ixgbe_phy_unknown) {
440 if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS)
445 status = ixgbe_call_func(hw, hw->phy.ops.reset, (hw),
453 * @hw: pointer to hardware structure
456 s32 ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, u16 *firmware_version)
460 status = ixgbe_call_func(hw, hw->phy.ops.get_firmware_version,
461 (hw, firmware_version),
468 * @hw: pointer to hardware structure
474 s32 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
477 if (hw->phy.id == 0)
478 ixgbe_identify_phy(hw);
480 return ixgbe_call_func(hw, hw->phy.ops.read_reg, (hw, reg_addr,
486 * @hw: pointer to hardware structure
492 s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
495 if (hw->phy.id == 0)
496 ixgbe_identify_phy(hw);
498 return ixgbe_call_func(hw, hw->phy.ops.write_reg, (hw, reg_addr,
504 * @hw: pointer to hardware structure
508 s32 ixgbe_setup_phy_link(struct ixgbe_hw *hw)
510 return ixgbe_call_func(hw, hw->phy.ops.setup_link, (hw),
516 * @hw: pointer to hardware structure
521 s32 ixgbe_check_phy_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
524 return ixgbe_call_func(hw, hw->phy.ops.check_link, (hw, speed,
530 * @hw: pointer to hardware structure
535 s32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed,
538 return ixgbe_call_func(hw, hw->phy.ops.setup_link_speed, (hw, speed,
545 * @hw: pointer to hardware structure
549 s32 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
552 return ixgbe_call_func(hw, hw->mac.ops.check_link, (hw, speed,
559 * @hw: pointer to hardware structure
563 void ixgbe_disable_tx_laser(struct ixgbe_hw *hw)
565 if (hw->mac.ops.disable_tx_laser)
566 hw->mac.ops.disable_tx_laser(hw);
571 * @hw: pointer to hardware structure
575 void ixgbe_enable_tx_laser(struct ixgbe_hw *hw)
577 if (hw->mac.ops.enable_tx_laser)
578 hw->mac.ops.enable_tx_laser(hw);
583 * @hw: pointer to hardware structure
589 void ixgbe_flap_tx_laser(struct ixgbe_hw *hw)
591 if (hw->mac.ops.flap_tx_laser)
592 hw->mac.ops.flap_tx_laser(hw);
597 * @hw: pointer to hardware structure
603 s32 ixgbe_setup_link(struct ixgbe_hw *hw, ixgbe_link_speed speed,
606 return ixgbe_call_func(hw, hw->mac.ops.setup_link, (hw, speed,
613 * @hw: pointer to hardware structure
617 s32 ixgbe_get_link_capabilities(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
620 return ixgbe_call_func(hw, hw->mac.ops.get_link_capabilities, (hw,
626 * @hw: pointer to hardware structure
631 s32 ixgbe_led_on(struct ixgbe_hw *hw, u32 index)
633 return ixgbe_call_func(hw, hw->mac.ops.led_on, (hw, index),
639 * @hw: pointer to hardware structure
644 s32 ixgbe_led_off(struct ixgbe_hw *hw, u32 index)
646 return ixgbe_call_func(hw, hw->mac.ops.led_off, (hw, index),
652 * @hw: pointer to hardware structure
657 s32 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index)
659 return ixgbe_call_func(hw, hw->mac.ops.blink_led_start, (hw, index),
665 * @hw: pointer to hardware structure
669 s32 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index)
671 return ixgbe_call_func(hw, hw->mac.ops.blink_led_stop, (hw, index),
677 * @hw: pointer to hardware structure
682 s32 ixgbe_init_eeprom_params(struct ixgbe_hw *hw)
684 return ixgbe_call_func(hw, hw->eeprom.ops.init_params, (hw),
691 * @hw: pointer to hardware structure
699 s32 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data)
701 return ixgbe_call_func(hw, hw->eeprom.ops.write, (hw, offset, data),
707 * @hw: pointer to hardware structure
716 s32 ixgbe_write_eeprom_buffer(struct ixgbe_hw *hw, u16 offset, u16 words,
719 return ixgbe_call_func(hw, hw->eeprom.ops.write_buffer,
720 (hw, offset, words, data),
726 * @hw: pointer to hardware structure
732 s32 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data)
734 return ixgbe_call_func(hw, hw->eeprom.ops.read, (hw, offset, data),
740 * @hw: pointer to hardware structure
747 s32 ixgbe_read_eeprom_buffer(struct ixgbe_hw *hw, u16 offset,
750 return ixgbe_call_func(hw, hw->eeprom.ops.read_buffer,
751 (hw, offset, words, data),
757 * @hw: pointer to hardware structure
762 s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val)
764 return ixgbe_call_func(hw, hw->eeprom.ops.validate_checksum,
765 (hw, checksum_val), IXGBE_NOT_IMPLEMENTED);
770 * @hw: pointer to hardware structure
772 s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw)
774 return ixgbe_call_func(hw, hw->eeprom.ops.update_checksum, (hw),
780 * @hw: pointer to hardware structure
787 s32 ixgbe_insert_mac_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
789 return ixgbe_call_func(hw, hw->mac.ops.insert_mac_addr,
790 (hw, addr, vmdq),
796 * @hw: pointer to hardware structure
804 s32 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
807 return ixgbe_call_func(hw, hw->mac.ops.set_rar, (hw, index, addr, vmdq,
813 * @hw: pointer to hardware structure
818 s32 ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index)
820 return ixgbe_call_func(hw, hw->mac.ops.clear_rar, (hw, index),
826 * @hw: pointer to hardware structure
830 s32 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
832 return ixgbe_call_func(hw, hw->mac.ops.set_vmdq, (hw, rar, vmdq),
839 * @hw: pointer to hardware structure
842 s32 ixgbe_set_vmdq_san_mac(struct ixgbe_hw *hw, u32 vmdq)
844 return ixgbe_call_func(hw, hw->mac.ops.set_vmdq_san_mac,
845 (hw, vmdq), IXGBE_NOT_IMPLEMENTED);
850 * @hw: pointer to hardware structure
854 s32 ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
856 return ixgbe_call_func(hw, hw->mac.ops.clear_vmdq, (hw, rar, vmdq),
862 * @hw: pointer to hardware structure
868 s32 ixgbe_init_rx_addrs(struct ixgbe_hw *hw)
870 return ixgbe_call_func(hw, hw->mac.ops.init_rx_addrs, (hw),
876 * @hw: pointer to hardware structure
878 u32 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw)
880 return hw->mac.num_rar_entries;
885 * @hw: pointer to hardware structure
894 s32 ixgbe_update_uc_addr_list(struct ixgbe_hw *hw, u8 *addr_list,
897 return ixgbe_call_func(hw, hw->mac.ops.update_uc_addr_list, (hw,
904 * @hw: pointer to hardware structure
914 s32 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
918 return ixgbe_call_func(hw, hw->mac.ops.update_mc_addr_list, (hw,
925 * @hw: pointer to hardware structure
929 s32 ixgbe_enable_mc(struct ixgbe_hw *hw)
931 return ixgbe_call_func(hw, hw->mac.ops.enable_mc, (hw),
937 * @hw: pointer to hardware structure
941 s32 ixgbe_disable_mc(struct ixgbe_hw *hw)
943 return ixgbe_call_func(hw, hw->mac.ops.disable_mc, (hw),
949 * @hw: pointer to hardware structure
953 s32 ixgbe_clear_vfta(struct ixgbe_hw *hw)
955 return ixgbe_call_func(hw, hw->mac.ops.clear_vfta, (hw),
961 * @hw: pointer to hardware structure
968 s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on)
970 return ixgbe_call_func(hw, hw->mac.ops.set_vfta, (hw, vlan, vind,
976 * @hw: pointer to hardware structure
985 s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on,
988 return ixgbe_call_func(hw, hw->mac.ops.set_vlvf, (hw, vlan, vind,
994 * @hw: pointer to hardware structure
998 s32 ixgbe_fc_enable(struct ixgbe_hw *hw)
1000 return ixgbe_call_func(hw, hw->mac.ops.fc_enable, (hw),
1006 * @hw: pointer to hardware structure
1012 s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
1015 return ixgbe_call_func(hw, hw->mac.ops.set_fw_drv_ver, (hw, maj, min,
1024 * @hw: pointer to hardware structure
1030 s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val)
1032 return ixgbe_call_func(hw, hw->mac.ops.read_analog_reg8, (hw, reg,
1038 * @hw: pointer to hardware structure
1044 s32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val)
1046 return ixgbe_call_func(hw, hw->mac.ops.write_analog_reg8, (hw, reg,
1052 * @hw: pointer to hardware structure
1057 s32 ixgbe_init_uta_tables(struct ixgbe_hw *hw)
1059 return ixgbe_call_func(hw, hw->mac.ops.init_uta_tables, (hw),
1065 * @hw: pointer to hardware structure
1071 s32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr,
1074 return ixgbe_call_func(hw, hw->phy.ops.read_i2c_byte, (hw, byte_offset,
1080 * @hw: pointer to hardware structure
1087 s32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr,
1090 return ixgbe_call_func(hw, hw->phy.ops.write_i2c_byte, (hw, byte_offset,
1096 * @hw: pointer to hardware structure
1102 s32 ixgbe_write_i2c_eeprom(struct ixgbe_hw *hw,
1105 return ixgbe_call_func(hw, hw->phy.ops.write_i2c_eeprom,
1106 (hw, byte_offset, eeprom_data),
1112 * @hw: pointer to hardware structure
1118 s32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data)
1120 return ixgbe_call_func(hw, hw->phy.ops.read_i2c_eeprom,
1121 (hw, byte_offset, eeprom_data),
1127 * @hw: pointer to hardware structure
1131 u32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw)
1133 return ixgbe_call_func(hw, hw->mac.ops.get_supported_physical_layer,
1134 (hw), IXGBE_PHYSICAL_LAYER_UNKNOWN);
1139 * @hw: pointer to hardware structure
1144 s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval)
1146 return ixgbe_call_func(hw, hw->mac.ops.enable_rx_dma,
1147 (hw, regval), IXGBE_NOT_IMPLEMENTED);
1152 * @hw: pointer to hardware structure
1156 s32 ixgbe_disable_sec_rx_path(struct ixgbe_hw *hw)
1158 return ixgbe_call_func(hw, hw->mac.ops.disable_sec_rx_path,
1159 (hw), IXGBE_NOT_IMPLEMENTED);
1164 * @hw: pointer to hardware structure
1168 s32 ixgbe_enable_sec_rx_path(struct ixgbe_hw *hw)
1170 return ixgbe_call_func(hw, hw->mac.ops.enable_sec_rx_path,
1171 (hw), IXGBE_NOT_IMPLEMENTED);
1176 * @hw: pointer to hardware structure
1182 s32 ixgbe_acquire_swfw_semaphore(struct ixgbe_hw *hw, u16 mask)
1184 return ixgbe_call_func(hw, hw->mac.ops.acquire_swfw_sync,
1185 (hw, mask), IXGBE_NOT_IMPLEMENTED);
1190 * @hw: pointer to hardware structure
1196 void ixgbe_release_swfw_semaphore(struct ixgbe_hw *hw, u16 mask)
1198 if (hw->mac.ops.release_swfw_sync)
1199 hw->mac.ops.release_swfw_sync(hw, mask);