e1000e: rename e1000e_reload_nvm() and call as function pointer
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 22 Feb 2012 09:03:14 +0000 (09:03 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 25 Feb 2012 05:43:21 +0000 (21:43 -0800)
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: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/80003es2lan.c
drivers/net/ethernet/intel/e1000e/82571.c
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/hw.h
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/nvm.c

index 6e58e94ff46b4a91da47b0725988908697213ed9..bac9dda31b6c0c044c8e8b8c68b6c88835920889 100644 (file)
@@ -1457,6 +1457,7 @@ static const struct e1000_nvm_operations es2_nvm_ops = {
        .acquire                = e1000_acquire_nvm_80003es2lan,
        .read                   = e1000e_read_nvm_eerd,
        .release                = e1000_release_nvm_80003es2lan,
+       .reload                 = e1000e_reload_nvm_generic,
        .update                 = e1000e_update_nvm_checksum_generic,
        .valid_led_default      = e1000e_valid_led_default,
        .validate               = e1000e_validate_nvm_checksum_generic,
index 7f44ab76a200bea3bf5512a084b7684ff3b77cf5..086dad7091790bfcb115e8294932cf0d022e6838 100644 (file)
@@ -1989,6 +1989,7 @@ static const struct e1000_nvm_operations e82571_nvm_ops = {
        .acquire                = e1000_acquire_nvm_82571,
        .read                   = e1000e_read_nvm_eerd,
        .release                = e1000_release_nvm_82571,
+       .reload                 = e1000e_reload_nvm_generic,
        .update                 = e1000_update_nvm_checksum_82571,
        .valid_led_default      = e1000_valid_led_default_82571,
        .validate               = e1000_validate_nvm_checksum_82571,
index 9f3a26859d6d693c52249a34b12208a95671482d..86cdd47939925b64ebe5f3d1859165d6f1880f30 100644 (file)
@@ -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_validate_nvm_checksum_generic(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);
 
 static inline s32 e1000e_read_mac_addr(struct e1000_hw *hw)
index 50e114b68e39ce72aca099f84534772a7fbd9715..f82ecf536c8b4ec42e836852dc889841fa81316e 100644 (file)
@@ -830,6 +830,7 @@ struct e1000_nvm_operations {
        s32  (*acquire)(struct e1000_hw *);
        s32  (*read)(struct e1000_hw *, u16, u16, u16 *);
        void (*release)(struct e1000_hw *);
+       void (*reload)(struct e1000_hw *);
        s32  (*update)(struct e1000_hw *);
        s32  (*valid_led_default)(struct e1000_hw *, u16 *);
        s32  (*validate)(struct e1000_hw *);
index df91c426a09858a9b9d3b9f1e933f1c87871dde5..8e9af624d54a13e7938263f82aa7201a59e94214 100644 (file)
@@ -2609,7 +2609,7 @@ release:
         * until after the next adapter reset.
         */
        if (!ret_val) {
-               e1000e_reload_nvm(hw);
+               nvm->ops.reload(hw);
                usleep_range(10000, 20000);
        }
 
@@ -4043,6 +4043,7 @@ static const struct e1000_nvm_operations ich8_nvm_ops = {
        .acquire                = e1000_acquire_nvm_ich8lan,
        .read                   = e1000_read_nvm_ich8lan,
        .release                = e1000_release_nvm_ich8lan,
+       .reload                 = e1000e_reload_nvm_generic,
        .update                 = e1000_update_nvm_checksum_ich8lan,
        .valid_led_default      = e1000_valid_led_default_ich8lan,
        .validate               = e1000_validate_nvm_checksum_ich8lan,
index 24b7930b75000c37fac4610a9c72531da43b65b9..a969f1af1b4ee22f3fb2ff0693c54498232df3fb 100644 (file)
@@ -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
  *
  *  Reloads the EEPROM by setting the "Reinitialize from EEPROM" bit in the
  *  extended control register.
  **/
-void e1000e_reload_nvm(struct e1000_hw *hw)
+void e1000e_reload_nvm_generic(struct e1000_hw *hw)
 {
        u32 ctrl_ext;