aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_ee.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb/ixgb_ee.c')
-rw-r--r--drivers/net/ixgb/ixgb_ee.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c
index 89ffa7264a1..06303a36aaf 100644
--- a/drivers/net/ixgb/ixgb_ee.c
+++ b/drivers/net/ixgb/ixgb_ee.c
@@ -26,6 +26,8 @@
26 26
27*******************************************************************************/ 27*******************************************************************************/
28 28
29#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
30
29#include "ixgb_hw.h" 31#include "ixgb_hw.h"
30#include "ixgb_ee.h" 32#include "ixgb_ee.h"
31/* Local prototypes */ 33/* Local prototypes */
@@ -467,11 +469,11 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
467 u16 checksum = 0; 469 u16 checksum = 0;
468 struct ixgb_ee_map_type *ee_map; 470 struct ixgb_ee_map_type *ee_map;
469 471
470 DEBUGFUNC("ixgb_get_eeprom_data"); 472 ENTER();
471 473
472 ee_map = (struct ixgb_ee_map_type *)hw->eeprom; 474 ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
473 475
474 DEBUGOUT("ixgb_ee: Reading eeprom data\n"); 476 pr_debug("Reading eeprom data\n");
475 for (i = 0; i < IXGB_EEPROM_SIZE ; i++) { 477 for (i = 0; i < IXGB_EEPROM_SIZE ; i++) {
476 u16 ee_data; 478 u16 ee_data;
477 ee_data = ixgb_read_eeprom(hw, i); 479 ee_data = ixgb_read_eeprom(hw, i);
@@ -480,7 +482,7 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
480 } 482 }
481 483
482 if (checksum != (u16) EEPROM_SUM) { 484 if (checksum != (u16) EEPROM_SUM) {
483 DEBUGOUT("ixgb_ee: Checksum invalid.\n"); 485 pr_debug("Checksum invalid\n");
484 /* clear the init_ctrl_reg_1 to signify that the cache is 486 /* clear the init_ctrl_reg_1 to signify that the cache is
485 * invalidated */ 487 * invalidated */
486 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); 488 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
@@ -489,7 +491,7 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
489 491
490 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) 492 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
491 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { 493 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
492 DEBUGOUT("ixgb_ee: Signature invalid.\n"); 494 pr_debug("Signature invalid\n");
493 return(false); 495 return(false);
494 } 496 }
495 497
@@ -555,13 +557,13 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw,
555 int i; 557 int i;
556 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; 558 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
557 559
558 DEBUGFUNC("ixgb_get_ee_mac_addr"); 560 ENTER();
559 561
560 if (ixgb_check_and_get_eeprom_data(hw) == true) { 562 if (ixgb_check_and_get_eeprom_data(hw) == true) {
561 for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) { 563 for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) {
562 mac_addr[i] = ee_map->mac_addr[i]; 564 mac_addr[i] = ee_map->mac_addr[i];
563 DEBUGOUT2("mac(%d) = %.2X\n", i, mac_addr[i]);
564 } 565 }
566 pr_debug("eeprom mac address = %pM\n", mac_addr);
565 } 567 }
566} 568}
567 569