Page MenuHomeFreeBSD

ixgbe: add MDIO access routines from intel DPDK
AbandonedPublic

Authored by adrian on Sat, May 3, 2:06 AM.
Tags
None
Referenced Files
F118631463: D50127.diff
Sat, May 31, 4:03 AM
Unknown Object (File)
Thu, May 29, 6:16 AM
Unknown Object (File)
Fri, May 23, 4:21 AM
Unknown Object (File)
Thu, May 22, 10:49 PM
Unknown Object (File)
Wed, May 21, 4:15 AM
Unknown Object (File)
Mon, May 19, 11:39 AM
Unknown Object (File)
Thu, May 15, 6:20 PM
Unknown Object (File)
Sat, May 10, 10:47 PM
Subscribers

Details

Reviewers
kbowling
erj
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

These are from Intel DPDK sources, which are BSD 3 claused licenced.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63848
Build 60732: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Sat, May 3, 2:06 AM
adrian requested review of this revision.Sat, May 3, 2:06 AM

So although not needed for etherswitch support, it is here for completeness.

This is (a) clause 45 only, (b) limited to the existing phy/mdi path that hard-codes the PHY address based on the NIC instance, and (c) isn't tied into the MDIO bus path in D50128.

I believe that this is to support a normal external clause 45 PHY attached to the backplane.

erj added a subscriber: erj.
erj added inline comments.
sys/dev/ixgbe/ixgbe_x550.c
546

My only nit here is that both ixgbe_read_phy_reg_x550em() and this function could be laid out the same way (e.g. just return early when you can't acquire the FW/SW semaphore), but they aren't?

I'm going to assume there are some hidden #ifdefs that are getting stripped out that require the write() function to be more complex for some reason. @krzysztof.galazka_intel.com ?

In D50127#1144438, @erj wrote:

I'm going to assume there are some hidden #ifdefs that are getting stripped out that require the write() function to be more complex for some reason. @krzysztof.galazka_intel.com ?

I'm looking into that, but it's been a while since I tinkered with X55n, so a lot of cache misses, sorry ;)

Anyway - those functions are also not implemented in Linux and DPDK drivers. In my understanding ixgbe_phy_x550em_kr means that an internal PHY is used, which is configured without using MDIO. For external PHYs connected through KR there is another PHY type: ixgbe_phy_x550em_ext_t. It has it's own set of PHY ops.

@adrian I don't think it's a good idea to add that. At least not without some kind of tunable/sysctl knob, which will be disabled by default.

In D50127#1145007, @krzysztof.galazka_intel.com wrote:
In D50127#1144438, @erj wrote:

I'm going to assume there are some hidden #ifdefs that are getting stripped out that require the write() function to be more complex for some reason. @krzysztof.galazka_intel.com ?

I'm looking into that, but it's been a while since I tinkered with X55n, so a lot of cache misses, sorry ;)

Anyway - those functions are also not implemented in Linux and DPDK drivers. In my understanding ixgbe_phy_x550em_kr means that an internal PHY is used, which is configured without using MDIO. For external PHYs connected through KR there is another PHY type: ixgbe_phy_x550em_ext_t. It has it's own set of PHY ops.

@adrian I don't think it's a good idea to add that. At least not without some kind of tunable/sysctl knob, which will be disabled by default.

oh interesting. yeah I just went and re-checked mainline DPDK and you're right, they're not there. I wonder why it was submitted / landed and then removed at some point? I'll go dig into it some more.

Ok, I'll ignore this diff for now until i get a board that seems to require it for some reason.

abandoning for now; it isn't required for MDIO support, and it may actually be incorrect in almost all cases outside of some specific hardware (which I don't have)