Hi Emil,

Ethtool actually does not complain anything at all.

# /sbin/ethtool -E eth4 magic 0x15288086 offset 1220 value 0
# /sbin/ethtool -E eth4 magic 0x15288086 offset 1221 value 0x0e
# /sbin/ethtool -E eth4 magic 0x15288086 offset 1222 value 0xb6
# /sbin/ethtool -E eth4 magic 0x15288086 offset 1223 value 0x04
# /sbin/ethtool -E eth4 magic 0x15288086 offset 1224 value 0x65
# /sbin/ethtool -E eth4 magic 0x15288086 offset 1225 value 0x91
# /sbin/ethtool -e eth4 offset 1220 length 6
Offset             Values
------                  ------
0x04c4                          00 0e b6 04 65 91

Howver, after doing the above change on "eth4", I found dmesg has these two 
lines below.

----------- Extracted from dmesg ----------------
ixgbe 0000:44:00.1: >eth5: NIC Link is Up 100 Mbps, Flow Control: None
IPv6: ADDRCONF(NETDEV_CHANGE): eth5: link becomes ready
------------------------------------------------------------


Note that eth5 is just another device of the same type.
# ethtool -i eth4
driver: ixgbe
version: 3.9.15-k
firmware-version: 0x80000314
bus-info: 0000:44:00.0
# ethtool -i eth5
driver: ixgbe
version: 3.9.15-k
firmware-version: 0x80000314
bus-info: 0000:44:00.1
# uname -a
Linux (none) 3.5.5 #2 SMP Wed Oct 3 11:00:33 PDT 2012 x86_64 GNU/Linux

 lspci -n | grep 1528
44:00.0 0200: 8086:1528 (rev 01)
44:00.1 0200: 8086:1528 (rev 01)

Thanks for looking into this.
--Steven


-----Original Message-----
From: Tantilov, Emil S [mailto:[email protected]] 
Sent: Monday, October 08, 2012 4:08 PM
To: Steven La; [email protected]
Subject: RE: [E1000-devel] Problem of using ethtool to change the content of 
NVM for Intel X540 Controller (8086:1528)



>-----Original Message-----
>From: Steven La [mailto:[email protected]]
>Sent: Monday, October 08, 2012 4:01 PM
>To: Tantilov, Emil S; [email protected]
>Subject: RE: [E1000-devel] Problem of using ethtool to change the 
>content of NVM for Intel X540 Controller (8086:1528)
>
>No, CONFIG_STRICT_DEVMEM was not set. Thanks, anyway.
>
>--Steven

Well I can't think of anything else. We are not able to reproduce the case 
you're describing in our lab.

Could you provide the output of ethtool -e?

Thanks,
Emil

>
>
>-----Original Message-----
>From: Tantilov, Emil S [mailto:[email protected]]
>Sent: Monday, October 08, 2012 3:40 PM
>To: Steven La; [email protected]
>Subject: RE: [E1000-devel] Problem of using ethtool to change the 
>content of NVM for Intel X540 Controller (8086:1528)
>
>>-----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

Reply via email to