Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194548
b: refs/heads/master
c: d328bc8
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and David S. Miller committed Apr 27, 2010
1 parent 1f06f82 commit 3b8b07c
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 157 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0dfb90e5b2d41c907de9b624657a6688541837e
refs/heads/master: d328bc839eac685cdd91f5d9d8ad95c070252038
8 changes: 6 additions & 2 deletions trunk/drivers/net/ixgb/ixgb.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,13 @@ struct ixgb_adapter;
#define PFX "ixgb: "

#ifdef _DEBUG_DRIVER_
#define IXGB_DBG(args...) printk(KERN_DEBUG PFX args)
#define IXGB_DBG(fmt, args...) printk(KERN_DEBUG PFX fmt, ##args)
#else
#define IXGB_DBG(args...)
#define IXGB_DBG(fmt, args...) \
do { \
if (0) \
printk(KERN_DEBUG PFX fmt, ##args); \
} while (0)
#endif

/* TX/RX descriptor defines */
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/net/ixgb/ixgb_ee.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*******************************************************************************/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include "ixgb_hw.h"
#include "ixgb_ee.h"
/* Local prototypes */
Expand Down Expand Up @@ -467,11 +469,11 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
u16 checksum = 0;
struct ixgb_ee_map_type *ee_map;

DEBUGFUNC("ixgb_get_eeprom_data");
ENTER();

ee_map = (struct ixgb_ee_map_type *)hw->eeprom;

DEBUGOUT("ixgb_ee: Reading eeprom data\n");
pr_debug("Reading eeprom data\n");
for (i = 0; i < IXGB_EEPROM_SIZE ; i++) {
u16 ee_data;
ee_data = ixgb_read_eeprom(hw, i);
Expand All @@ -480,7 +482,7 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)
}

if (checksum != (u16) EEPROM_SUM) {
DEBUGOUT("ixgb_ee: Checksum invalid.\n");
pr_debug("Checksum invalid\n");
/* clear the init_ctrl_reg_1 to signify that the cache is
* invalidated */
ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR);
Expand All @@ -489,7 +491,7 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)

if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK))
!= cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) {
DEBUGOUT("ixgb_ee: Signature invalid.\n");
pr_debug("Signature invalid\n");
return(false);
}

Expand Down Expand Up @@ -555,13 +557,13 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw,
int i;
struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;

DEBUGFUNC("ixgb_get_ee_mac_addr");
ENTER();

if (ixgb_check_and_get_eeprom_data(hw) == true) {
for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) {
mac_addr[i] = ee_map->mac_addr[i];
DEBUGOUT2("mac(%d) = %.2X\n", i, mac_addr[i]);
}
pr_debug("eeprom mac address = %pM\n", mac_addr);
}
}

Expand Down
Loading

0 comments on commit 3b8b07c

Please sign in to comment.