Commit e85e3639 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

e1000e: rename e1000e_reload_nvm() and call as function pointer

Rename e1000e_reload_nvm() to e1000e_reload_nvm_generic() to signify the
function is used for more than one MAC-family type, and set and use it as a
MAC ops function pointer to be consistent with the driver design.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0d37678e
...@@ -1457,6 +1457,7 @@ static const struct e1000_nvm_operations es2_nvm_ops = { ...@@ -1457,6 +1457,7 @@ static const struct e1000_nvm_operations es2_nvm_ops = {
.acquire = e1000_acquire_nvm_80003es2lan, .acquire = e1000_acquire_nvm_80003es2lan,
.read = e1000e_read_nvm_eerd, .read = e1000e_read_nvm_eerd,
.release = e1000_release_nvm_80003es2lan, .release = e1000_release_nvm_80003es2lan,
.reload = e1000e_reload_nvm_generic,
.update = e1000e_update_nvm_checksum_generic, .update = e1000e_update_nvm_checksum_generic,
.valid_led_default = e1000e_valid_led_default, .valid_led_default = e1000e_valid_led_default,
.validate = e1000e_validate_nvm_checksum_generic, .validate = e1000e_validate_nvm_checksum_generic,
......
...@@ -1989,6 +1989,7 @@ static const struct e1000_nvm_operations e82571_nvm_ops = { ...@@ -1989,6 +1989,7 @@ static const struct e1000_nvm_operations e82571_nvm_ops = {
.acquire = e1000_acquire_nvm_82571, .acquire = e1000_acquire_nvm_82571,
.read = e1000e_read_nvm_eerd, .read = e1000e_read_nvm_eerd,
.release = e1000_release_nvm_82571, .release = e1000_release_nvm_82571,
.reload = e1000e_reload_nvm_generic,
.update = e1000_update_nvm_checksum_82571, .update = e1000_update_nvm_checksum_82571,
.valid_led_default = e1000_valid_led_default_82571, .valid_led_default = e1000_valid_led_default_82571,
.validate = e1000_validate_nvm_checksum_82571, .validate = e1000_validate_nvm_checksum_82571,
......
...@@ -684,7 +684,7 @@ extern s32 e1000e_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg); ...@@ -684,7 +684,7 @@ extern s32 e1000e_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg);
extern s32 e1000e_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); extern s32 e1000e_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
extern s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw); extern s32 e1000e_validate_nvm_checksum_generic(struct e1000_hw *hw);
extern void e1000e_release_nvm(struct e1000_hw *hw); extern void e1000e_release_nvm(struct e1000_hw *hw);
extern void e1000e_reload_nvm(struct e1000_hw *hw); extern void e1000e_reload_nvm_generic(struct e1000_hw *hw);
extern s32 e1000_read_mac_addr_generic(struct e1000_hw *hw); extern s32 e1000_read_mac_addr_generic(struct e1000_hw *hw);
static inline s32 e1000e_read_mac_addr(struct e1000_hw *hw) static inline s32 e1000e_read_mac_addr(struct e1000_hw *hw)
......
...@@ -830,6 +830,7 @@ struct e1000_nvm_operations { ...@@ -830,6 +830,7 @@ struct e1000_nvm_operations {
s32 (*acquire)(struct e1000_hw *); s32 (*acquire)(struct e1000_hw *);
s32 (*read)(struct e1000_hw *, u16, u16, u16 *); s32 (*read)(struct e1000_hw *, u16, u16, u16 *);
void (*release)(struct e1000_hw *); void (*release)(struct e1000_hw *);
void (*reload)(struct e1000_hw *);
s32 (*update)(struct e1000_hw *); s32 (*update)(struct e1000_hw *);
s32 (*valid_led_default)(struct e1000_hw *, u16 *); s32 (*valid_led_default)(struct e1000_hw *, u16 *);
s32 (*validate)(struct e1000_hw *); s32 (*validate)(struct e1000_hw *);
......
...@@ -2609,7 +2609,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw) ...@@ -2609,7 +2609,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
* until after the next adapter reset. * until after the next adapter reset.
*/ */
if (!ret_val) { if (!ret_val) {
e1000e_reload_nvm(hw); nvm->ops.reload(hw);
usleep_range(10000, 20000); usleep_range(10000, 20000);
} }
...@@ -4043,6 +4043,7 @@ static const struct e1000_nvm_operations ich8_nvm_ops = { ...@@ -4043,6 +4043,7 @@ static const struct e1000_nvm_operations ich8_nvm_ops = {
.acquire = e1000_acquire_nvm_ich8lan, .acquire = e1000_acquire_nvm_ich8lan,
.read = e1000_read_nvm_ich8lan, .read = e1000_read_nvm_ich8lan,
.release = e1000_release_nvm_ich8lan, .release = e1000_release_nvm_ich8lan,
.reload = e1000e_reload_nvm_generic,
.update = e1000_update_nvm_checksum_ich8lan, .update = e1000_update_nvm_checksum_ich8lan,
.valid_led_default = e1000_valid_led_default_ich8lan, .valid_led_default = e1000_valid_led_default_ich8lan,
.validate = e1000_validate_nvm_checksum_ich8lan, .validate = e1000_validate_nvm_checksum_ich8lan,
......
...@@ -625,13 +625,13 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw) ...@@ -625,13 +625,13 @@ s32 e1000e_update_nvm_checksum_generic(struct e1000_hw *hw)
} }
/** /**
* e1000e_reload_nvm - Reloads EEPROM * e1000e_reload_nvm_generic - Reloads EEPROM
* @hw: pointer to the HW structure * @hw: pointer to the HW structure
* *
* Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the * Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the
* extended control register. * extended control register.
**/ **/
void e1000e_reload_nvm(struct e1000_hw *hw) void e1000e_reload_nvm_generic(struct e1000_hw *hw)
{ {
u32 ctrl_ext; u32 ctrl_ext;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment