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.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c
index 813993f9c65c..c982ab9f9005 100644
--- a/drivers/net/ixgb/ixgb_ee.c
+++ b/drivers/net/ixgb/ixgb_ee.c
@@ -296,12 +296,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw)
296 eecd_reg = IXGB_READ_REG(hw, EECD); 296 eecd_reg = IXGB_READ_REG(hw, EECD);
297 297
298 if (eecd_reg & IXGB_EECD_DO) 298 if (eecd_reg & IXGB_EECD_DO)
299 return (true); 299 return true;
300 300
301 udelay(50); 301 udelay(50);
302 } 302 }
303 ASSERT(0); 303 ASSERT(0);
304 return (false); 304 return false;
305} 305}
306 306
307/****************************************************************************** 307/******************************************************************************
@@ -327,9 +327,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw)
327 checksum += ixgb_read_eeprom(hw, i); 327 checksum += ixgb_read_eeprom(hw, i);
328 328
329 if (checksum == (u16) EEPROM_SUM) 329 if (checksum == (u16) EEPROM_SUM)
330 return (true); 330 return true;
331 else 331 else
332 return (false); 332 return false;
333} 333}
334 334
335/****************************************************************************** 335/******************************************************************************
@@ -439,7 +439,7 @@ ixgb_read_eeprom(struct ixgb_hw *hw,
439 /* End this read operation */ 439 /* End this read operation */
440 ixgb_standby_eeprom(hw); 440 ixgb_standby_eeprom(hw);
441 441
442 return (data); 442 return data;
443} 443}
444 444
445/****************************************************************************** 445/******************************************************************************
@@ -476,16 +476,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
476 /* clear the init_ctrl_reg_1 to signify that the cache is 476 /* clear the init_ctrl_reg_1 to signify that the cache is
477 * invalidated */ 477 * invalidated */
478 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); 478 ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
479 return (false); 479 return false;
480 } 480 }
481 481
482 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) 482 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
483 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { 483 != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
484 pr_debug("Signature invalid\n"); 484 pr_debug("Signature invalid\n");
485 return(false); 485 return false;
486 } 486 }
487 487
488 return(true); 488 return true;
489} 489}
490 490
491/****************************************************************************** 491/******************************************************************************
@@ -505,7 +505,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)
505 505
506 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) 506 if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
507 == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { 507 == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
508 return (true); 508 return true;
509 } else { 509 } else {
510 return ixgb_get_eeprom_data(hw); 510 return ixgb_get_eeprom_data(hw);
511 } 511 }
@@ -526,10 +526,10 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)
526 526
527 if ((index < IXGB_EEPROM_SIZE) && 527 if ((index < IXGB_EEPROM_SIZE) &&
528 (ixgb_check_and_get_eeprom_data(hw) == true)) { 528 (ixgb_check_and_get_eeprom_data(hw) == true)) {
529 return(hw->eeprom[index]); 529 return hw->eeprom[index];
530 } 530 }
531 531
532 return(0); 532 return 0;
533} 533}
534 534
535/****************************************************************************** 535/******************************************************************************
@@ -570,10 +570,10 @@ u32
570ixgb_get_ee_pba_number(struct ixgb_hw *hw) 570ixgb_get_ee_pba_number(struct ixgb_hw *hw)
571{ 571{
572 if (ixgb_check_and_get_eeprom_data(hw) == true) 572 if (ixgb_check_and_get_eeprom_data(hw) == true)
573 return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) 573 return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG])
574 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); 574 | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16);
575 575
576 return(0); 576 return 0;
577} 577}
578 578
579 579
@@ -591,8 +591,8 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw)
591 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; 591 struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;
592 592
593 if (ixgb_check_and_get_eeprom_data(hw) == true) 593 if (ixgb_check_and_get_eeprom_data(hw) == true)
594 return (le16_to_cpu(ee_map->device_id)); 594 return le16_to_cpu(ee_map->device_id);
595 595
596 return (0); 596 return 0;
597} 597}
598 598