Page MenuHomeFreeBSD

ixgbe: Disable EEE for backplane X550EM_X
ClosedPublic

Authored by zvargas_xes-inc.com on Sep 16 2019, 1:18 PM.
Referenced Files
F81388279: D21673.diff
Mon, Apr 15, 3:00 PM
Unknown Object (File)
Sat, Apr 6, 4:11 AM
Unknown Object (File)
Mar 3 2024, 1:37 PM
Unknown Object (File)
Feb 11 2024, 1:57 AM
Unknown Object (File)
Feb 3 2024, 10:11 PM
Unknown Object (File)
Jan 9 2024, 3:50 AM
Unknown Object (File)
Jan 8 2024, 7:47 PM
Unknown Object (File)
Jan 7 2024, 8:32 PM
Subscribers

Details

Summary

Intel documentation indicates that backplane X550EM_X KR devices do not
support Energy Efficient Ethernet.

Signed-off-by: Zach Vargas <zvargas@xes-inc.com>

Test Plan

Prior to this patch X552 devices (device ID 0x15AB) will crash the system when transitioning EEE state via sysctl.

Running 12.0 RELEASE FreeBSD from https://svn.freebsd.org/base/releng/12.0, attempting to change the EEE state of an ix adapter:

root@bsd:~ # uname -r
12.0-RELEASE 
root@bsd:~ # sysctl dev.ix.1.eee_state
dev.ix.1.eee_state: 1
root@bsd:~ # sysctl dev.ix.1.eee_state=0


Fatal trap 12: page fault while in kernel mode
cpuid = 5; apic id = 05
fault virtual address  = 0x0
fault code             = supervisor read instruction, page not present
instruction pointer    = 0x20:0x0
stack pointer          = 0x28:0xfffffe008a86d718
frame pointer          = 0x28:0xfffffe008a86d760
code segment           = base 0x0, limit 0xfffff, type 0x1b
                       = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags       = interrupt enabled, resume, IOPL = 0
current process                = 2424 (sysctl)
trap number            = 12
panic: page fault
cpuid = 5
time = 1563820937
KDB: stack backtrace:
#0 0xffffffff80bdcbc7 at kdb_backtrace+0x67
#1 0xffffffff80b907b3 at vpanic+0x1a3
#2 0xffffffff80b90603 at panic+0x43
#3 0xffffffff8106996f at trap_fatal+0x35f
#4 0xffffffff810699c9 at trap_pfault+0x49
#5 0xffffffff81068fee at trap+0x29e
#6 0xffffffff81044425 at calltrap+0x8
#7 0xffffffff80b9f56b at sysctl_root_handler_locked+0x8b
#8 0xffffffff80b9ec27 at sysctl_root+0x257
#9 0xffffffff80b9f29a at userland_sysctl+0x17a
#10 0xffffffff80b9f0df at sys___sysctl+0x5f
#11 0xffffffff8106a449 at amd64_syscall+0x369
#12 0xffffffff81044d0d at fast_syscall_common+0x101
Uptime: 36m40s
Dumping 736 out of 16329 MB:..3%..11%..22%..31%..42%..53%..61%..72%..81%..92%
Dump complete

Testing with this patch applied:

root@bsd:~/freebsd-ixgbe # sysctl dev.ix.1.eee_state
sysctl: unknown oid 'dev.ix.1.eee_state'
root@bsd:~/freebsd-ixgbe #

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

erj added inline comments.
sys/dev/ixgbe/if_ix.c
4418 ↗(On Diff #62034)

If you replace this call with "ixgbe_setup_eee", that would also help prevent a kernel panic if this sysctl somehow gets called without adapter->hw.mac.ops.setup_eee() from being set.

erj requested changes to this revision.Sep 30 2019, 6:26 PM
This revision now requires changes to proceed.Sep 30 2019, 6:26 PM

Thank you for the feedback. After applying (only) the suggested change, testing a EEE state change with my hardware looks like the following:

root@freebsd:/usr/src # sysctl dev.ix.1.eee_state
dev.ix.1.eee_state: 1
root@freebsd:/usr/src # sysctl dev.ix.1.eee_state=0
dev.ix.1.eee_staix1: Error in EEE setup: 0x7FFFFFFF
te: 1
sysctl: dev.ix.1.eee_state=0: Invalid argument
root@freebsd:/usr/src #

With the full patch, testing remains unchanged because EEE will be disabled for my X550EM_X KR device.

This revision is now accepted and ready to land.Oct 8 2019, 5:53 PM
This revision was automatically updated to reflect the committed changes.