>-----Original Message----- >From: Steven La [mailto:[email protected]] >Sent: Friday, October 05, 2012 6:24 PM >To: [email protected] >Subject: [E1000-devel] Problem of using ethtool to change the content of >NVM for Intel X540 Controller (8086:1528) > >Hi all, > >I am trying to flash a new MAC address into the NVM of the X540 controller >using the Linux 3.5 kernel with option CONFIG_IXGBE set to yes. > ># uname -a >Linux (none) 3.5.5 #2 SMP Wed Oct 3 11:00:33 PDT 2012 x86_64 GNU/Linux > ># ethtool -i eth0 >driver: ixgbe >version: 3.9.15-k >firmware-version: 0x80000314 >bus-info: 0000:44:00.0 > >After reading the X540 Controller datasheet, I have figured out the offset >of the MAC address start at location 1220 in the NVM (this is for the one >of the two functions of the PCI device). I verify the correctness of the >offset by doing the following. > ># ifconfig eth0 >eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 > UP BROADCAST MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) > ># /sbin/ethtool -e eth0 offset 1220 length 6 >Offset Values >------ ------ >0x04c4 00 11 22 33 44 55 > >Then, I program the MAC address by doing the following: > ># /sbin/ethtool -e eth0 offset 1220 length 6 >Offset Values >------ ------ >0x04c4 00 11 22 33 44 55 ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1220 value 0 ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1221 value 0x0e ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1222 value 0xb1 ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1223 value 0xdf ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1224 value 0xd5 ># /sbin/ethtool -E eth0 magic 0x15288086 offset 1225 value 0xa8 > >I verify that the content of the NVM has been changed to the new MAC >address. > ># /sbin/ethtool -e eth0 offset 1220 length 6 >Offset Values >------ ------ >0x04c4 00 0e b1 df d5 a8 > >After rebooting the machine and power cycling the box, the kernel comes up >but the content of the NVM has not been changed, and it is still the >original value (00:11:22:33:44:55). > ># ifconfig eth0 >eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55 > UP BROADCAST MULTICAST MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) > ># /sbin/ethtool -e eth0 offset 1220 length 6 >Offset Values >------ ------ >0x04c4 00 11 22 33 44 55 > >I would really appreciate that if anyone can tell me what is wrong with >this?
Do you have CONFIG_STRICT_DEVMEM set in your kernel? If so try using "iomem=relaxed" as kernel parameter. Thanks, Emil ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
