Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266446
b: refs/heads/master
c: 76d0652
h: refs/heads/master
v: v3
  • Loading branch information
Akeem G. Abodunrin authored and Jeff Kirsher committed Oct 6, 2011
1 parent 0fdd32e commit 705b28e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b8456c0199c4dd35bb7a04ff299ab925699e390
refs/heads/master: 76d06521f514e4e7e6bfb848ef0e3f8eb421f46d
6 changes: 6 additions & 0 deletions trunk/drivers/net/ethernet/intel/igb/e1000_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data)
u32 i, i2ccmd = 0;
u16 phy_data_swapped;

/* Prevent overwritting SFP I2C EEPROM which is at A0 address.*/
if ((hw->phy.addr == 0) || (hw->phy.addr > 7)) {
hw_dbg("PHY I2C Address %d is out of range.\n",
hw->phy.addr);
return -E1000_ERR_CONFIG;
}

/* Swap the data bytes for the I2C interface */
phy_data_swapped = ((data >> 8) & 0x00FF) | ((data << 8) & 0xFF00);
Expand Down

0 comments on commit 705b28e

Please sign in to comment.