I'm still trying to disable this absurd "qualified module" check so that I
can use some custom optics, and have made some progress. Attached is a
small tool I've been using to poke around the NVM of the X710. All my
digging has been informed by what I've read in the i40e driver in kernel
4.5 and the data sheet I found online:

http://www.intel.de/content/dam/www/public/us/en/documents/datasheets/xl710-10-40-controller-datasheet.pdf

The NVM memory in "module 0" corresponds roughly to what I'd expect to see
from Section 6.3 of the data sheet. In particular, the "NVM Control Word 1"
looks like it should. Here is the output:

root@pumpkin:/home/terpstra/x# ./mytool 0 80 0

00000000 + 00 => 0249 (NVM Control Word 1)

00000000 + 01 => 0004

00000000 + 02 => 0005

00000000 + 03 => 802a

00000000 + 04 => 8024

00000000 + 05 => 802e

00000000 + 06 => 7fff

00000000 + 07 => 7d80

00000000 + 08 => 0bb6

00000000 + 09 => 802c

00000000 + 0a => 0104

00000000 + 0b => 8150

00000000 + 0c => ffff

00000000 + 0d => 0150

00000000 + 0e => 8020

00000000 + 0f => 8022

00000000 + 10 => 0400

00000000 + 11 => ffff

00000000 + 12 => ffff

00000000 + 13 => ffff

00000000 + 14 => ffff

00000000 + 15 => fafa

00000000 + 16 => 063b

00000000 + 17 => 0663

00000000 + 18 => 5002

00000000 + 19 => ffff

00000000 + 1a => ffff

00000000 + 1b => ffff

00000000 + 1c => ffff

00000000 + 1d => ffff

00000000 + 1e => ffff

00000000 + 1f => ffff

00000000 + 20 => ffff

00000000 + 21 => ffff

00000000 + 22 => ffff

00000000 + 23 => ffff

00000000 + 24 => ffff

00000000 + 25 => ffff

00000000 + 26 => 7fff

00000000 + 27 => ffff

00000000 + 28 => 060a

00000000 + 29 => 3075

00000000 + 2a => 0033

00000000 + 2b => 3010

00000000 + 2c => ffff

00000000 + 2d => 2284

00000000 + 2e => 8000

00000000 + 2f => 040a

00000000 + 30 => 0641

00000000 + 31 => 0652

00000000 + 32 => 101f

00000000 + 33 => 400b

00000000 + 34 => 0000

00000000 + 35 => 0000

00000000 + 36 => ffff

00000000 + 37 => 0baf

00000000 + 38 => 0cb9

00000000 + 39 => 7fff

00000000 + 3a => 01fc

00000000 + 3b => 6258

00000000 + 3c => 0ec3

00000000 + 3d => 8026

00000000 + 3e => 7e00

00000000 + 3f => a67b

00000000 + 40 => 8272

00000000 + 41 => 0122

00000000 + 42 => ffff

00000000 + 43 => 0010

00000000 + 44 => 83b4

00000000 + 45 => 0020

00000000 + 46 => 8028

00000000 + 47 => 0002

00000000 + 48 => 6722 (EMP SR Settings Pointer)

00000000 + 49 => 7fff

00000000 + 4a => 0405

00000000 + 4b => ffff

00000000 + 4c => 0100

00000000 + 4d => 8394

00000000 + 4e => 7fff

00000000 + 4f => ffff

Following the "EMP SR Settings Pointer" (0x6722 on my card) I find what
looks like this:


root@pumpkin:/home/terpstra/x# ./mytool 0x6722 0x2b 0

00006722 + 00 => 002a (seems like the correct length)

00006722 + 01 => 6664

00006722 + 02 => 6a68

00006722 + 03 => 0000

00006722 + 04 => 0000

00006722 + 05 => 0026

00006722 + 06 => 8000

00006722 + 07 => 1572 (SFI SFI; seems legit)

00006722 + 08 => 1572

00006722 + 09 => 1572

00006722 + 0a => 154b

00006722 + 0b => 154c

00006722 + 0c => 154c

00006722 + 0d => 154c

00006722 + 0e => 154b

00006722 + 0f => 0002

00006722 + 10 => 0002

00006722 + 11 => 0002

00006722 + 12 => 154b

00006722 + 13 => 0002

00006722 + 14 => 0002

00006722 + 15 => 0002

00006722 + 16 => 154b

00006722 + 17 => 00c5

00006722 + 18 => 00f5

00006722 + 19 => 0135 (PHY Capabilities LAN 0 Pointer)

00006722 + 1a => 0140 (PHY Capabilities LAN 1 Pointer)

00006722 + 1b => 014b (PHY Capabilities LAN 2 Pointer)

00006722 + 1c => 0156 (PHY Capabilities LAN 3 Pointer)

00006722 + 1d => 0606

00006722 + 1e => 0606

00006722 + 1f => 0606

00006722 + 20 => 0606

00006722 + 21 => 0606

00006722 + 22 => 0606

00006722 + 23 => 0606

00006722 + 24 => 0606

00006722 + 25 => 0159

00006722 + 26 => 015b

00006722 + 27 => 015d

00006722 + 28 => 015f

00006722 + 29 => ffff

00006722 + 2a => 01e7 (has reserved bit 2 high; suspicious)

Comparing this with Section 6.3.19 of the data sheet is a bit rough. A
couple fields look reasonable, but others don't. In particular, the PHY
Capabilities pointers are 0xb in value apart. However, the data sheet says
they should be 0xc long. Furthermore, reading at 0x6722+0x135 is complete
garbage:

root@pumpkin:/home/terpstra/x# ./mytool $((0x6722+0x135)) 0xc 0

00006857 + 00 => 8000

00006857 + 01 => ffff

00006857 + 02 => ffff

00006857 + 03 => ffff

00006857 + 04 => 8000

00006857 + 05 => ffff

00006857 + 06 => ffff

00006857 + 07 => ffff

00006857 + 08 => 8000

00006857 + 09 => ffff

00006857 + 0a => ffff

00006857 + 0b => ffff

So, my quest to locate the all-important PHY Capabilities Misc0 register
(Section 6.3.23.9 of the data sheet) has thus far failed.

I have a suspicion that part of my problem is that I'm looking in the wrong
"module". The data sheet describes that there are different modules, and
mytool also supports reading from them, but it's unclear to me how the
module pointers relate to the different modules. The data sheet I have does
not discuss this.

Does someone have a more up-to-date data sheet and/or knowledge of how the
module pointers and NVM address and module relate? And/or the source code
to nvmupdate64e which certainly is doing this correctly?

Thanks for any and all feedback.

PS. It seems mind boggling that Intel has intentionally locked their cards
to specific SFPs. The whole point of using SFPs is so that you can mix and
match different PHY types as you need them!

On Sat, Mar 19, 2016 at 12:25 AM, Wesley W. Terpstra <wes...@terpstra.ca>
wrote:

> Hi! I have an Intel X710-DA4 and want to use it with a few different SFPs.
> Unfortunately, out-of-the-box this seems to be disabled.
>
> From poking around, it seems that the x710 firmware rejects SFPs not
> listed in the NVM qualified database whenever the "Enable Module
> Qualification" bit is set (see Section 6.3.23.9 in the Intel Ethernet
> Controller XL710 Datasheet). From what I've read in the data sheet and i40e
> linux driver, it seems I just need to set this bit to 0 and I should be
> good to go.
>
> I am looking for the source code for nvmupdate64e, as this userspace tool
> seems to use the ethtools_ops.set_eeprom syscall to write the NVM, which is
> what I'd like to do. Where can I find the source-code for this? The
> i40e_type.h header in the linux driver is pretty undocumented in the
> correct use of i40e_nvmupd_cmd. I don't want to screw up the CRC, so would
> prefer to simply modify the existing NVM update tool.
>
> Anyone know where the source code is?
>
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to