29 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
36 static void ixgb_shift_out_bits(
struct ixgb_hw *
hw,
39 static void ixgb_standby_eeprom(
struct ixgb_hw *
hw);
41 static bool ixgb_wait_eeprom_command(
struct ixgb_hw *
hw);
43 static void ixgb_cleanup_eeprom(
struct ixgb_hw *
hw);
102 mask = 0x01 << (count - 1);
121 ixgb_raise_clock(hw, &eecd_reg);
122 ixgb_lower_clock(hw, &eecd_reg);
139 ixgb_shift_in_bits(
struct ixgb_hw *hw)
157 for (i = 0; i < 16; i++) {
159 ixgb_raise_clock(hw, &eecd_reg);
167 ixgb_lower_clock(hw, &eecd_reg);
182 ixgb_setup_eeprom(
struct ixgb_hw *hw)
203 ixgb_standby_eeprom(
struct ixgb_hw *hw)
240 ixgb_clock_eeprom(
struct ixgb_hw *hw)
265 ixgb_cleanup_eeprom(
struct ixgb_hw *hw)
275 ixgb_clock_eeprom(hw);
290 ixgb_wait_eeprom_command(
struct ixgb_hw *hw)
298 ixgb_standby_eeprom(hw);
304 for (i = 0; i < 200; i++) {
383 ixgb_setup_eeprom(hw);
389 ixgb_shift_out_bits(hw, 0, 4);
392 ixgb_standby_eeprom(hw);
396 ixgb_shift_out_bits(hw, offset, 6);
399 ixgb_shift_out_bits(hw, data, 16);
401 ixgb_wait_eeprom_command(hw);
404 ixgb_standby_eeprom(hw);
411 ixgb_shift_out_bits(hw, 0, 4);
414 ixgb_cleanup_eeprom(hw);
436 ixgb_setup_eeprom(hw);
443 ixgb_shift_out_bits(hw, offset, 6);
446 data = ixgb_shift_in_bits(hw);
449 ixgb_standby_eeprom(hw);
511 ixgb_check_and_get_eeprom_data (
struct ixgb_hw* hw)
559 if (ixgb_check_and_get_eeprom_data(hw)) {
563 pr_debug(
"eeprom mac address = %pM\n", mac_addr);
579 if (ixgb_check_and_get_eeprom_data(hw))
600 if (ixgb_check_and_get_eeprom_data(hw))