diff options
| author | Akeem G. Abodunrin <akeem.g.abodunrin@intel.com> | 2013-01-29 05:15:05 -0500 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-02-15 04:40:29 -0500 |
| commit | a1bf1f44c6ee3ddf803063692a2f1d5ed483efdc (patch) | |
| tree | a1b734c166817d8b7766d51ef1b47dcee325c120 | |
| parent | 56d8c27f6f406f2d232caedb1e60f28eafc8c9d7 (diff) | |
igb: Intialize MAC function pointers
This patch initializes MAC function pointers for device configuration.
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| -rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_82575.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index e59fc9bb9955..8604013a21b5 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c | |||
| @@ -332,6 +332,67 @@ s32 igb_init_nvm_params_82575(struct e1000_hw *hw) | |||
| 332 | return 0; | 332 | return 0; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | /** | ||
| 336 | * igb_init_mac_params_82575 - Init MAC func ptrs. | ||
| 337 | * @hw: pointer to the HW structure | ||
| 338 | **/ | ||
| 339 | static s32 igb_init_mac_params_82575(struct e1000_hw *hw) | ||
| 340 | { | ||
| 341 | struct e1000_mac_info *mac = &hw->mac; | ||
| 342 | struct e1000_dev_spec_82575 *dev_spec = &hw->dev_spec._82575; | ||
| 343 | |||
| 344 | /* Set mta register count */ | ||
| 345 | mac->mta_reg_count = 128; | ||
| 346 | /* Set rar entry count */ | ||
| 347 | switch (mac->type) { | ||
| 348 | case e1000_82576: | ||
| 349 | mac->rar_entry_count = E1000_RAR_ENTRIES_82576; | ||
| 350 | break; | ||
| 351 | case e1000_82580: | ||
| 352 | mac->rar_entry_count = E1000_RAR_ENTRIES_82580; | ||
| 353 | break; | ||
| 354 | case e1000_i350: | ||
| 355 | mac->rar_entry_count = E1000_RAR_ENTRIES_I350; | ||
| 356 | break; | ||
| 357 | default: | ||
| 358 | mac->rar_entry_count = E1000_RAR_ENTRIES_82575; | ||
| 359 | break; | ||
| 360 | } | ||
| 361 | /* reset */ | ||
| 362 | if (mac->type >= e1000_82580) | ||
| 363 | mac->ops.reset_hw = igb_reset_hw_82580; | ||
| 364 | else | ||
| 365 | mac->ops.reset_hw = igb_reset_hw_82575; | ||
| 366 | |||
| 367 | if (mac->type >= e1000_i210) { | ||
| 368 | mac->ops.acquire_swfw_sync = igb_acquire_swfw_sync_i210; | ||
| 369 | mac->ops.release_swfw_sync = igb_release_swfw_sync_i210; | ||
| 370 | |||
| 371 | } else { | ||
| 372 | mac->ops.acquire_swfw_sync = igb_acquire_swfw_sync_82575; | ||
| 373 | mac->ops.release_swfw_sync = igb_release_swfw_sync_82575; | ||
| 374 | } | ||
| 375 | |||
| 376 | /* Set if part includes ASF firmware */ | ||
| 377 | mac->asf_firmware_present = true; | ||
| 378 | /* Set if manageability features are enabled. */ | ||
| 379 | mac->arc_subsystem_valid = | ||
| 380 | (rd32(E1000_FWSM) & E1000_FWSM_MODE_MASK) | ||
| 381 | ? true : false; | ||
| 382 | /* enable EEE on i350 parts and later parts */ | ||
| 383 | if (mac->type >= e1000_i350) | ||
| 384 | dev_spec->eee_disable = false; | ||
| 385 | else | ||
| 386 | dev_spec->eee_disable = true; | ||
| 387 | /* physical interface link setup */ | ||
| 388 | mac->ops.setup_physical_interface = | ||
| 389 | (hw->phy.media_type == e1000_media_type_copper) | ||
| 390 | ? igb_setup_copper_link_82575 | ||
| 391 | : igb_setup_serdes_link_82575; | ||
| 392 | |||
| 393 | return 0; | ||
| 394 | } | ||
| 395 | |||
| 335 | static s32 igb_get_invariants_82575(struct e1000_hw *hw) | 396 | static s32 igb_get_invariants_82575(struct e1000_hw *hw) |
| 336 | { | 397 | { |
| 337 | struct e1000_phy_info *phy = &hw->phy; | 398 | struct e1000_phy_info *phy = &hw->phy; |
