Bug 231828 - em(4) is unusable after suspend/resume
Summary: em(4) is unusable after suspend/resume
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-30 17:21 UTC by pete
Modified: 2019-04-11 20:03 UTC (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pete 2018-09-30 17:21:45 UTC
There are several reports that when using an em(4) device on 12-CURRENT the NIC is unusable until after a reboot or kld_unload/kld_load of the if_em kernel module.

upon resume there are messages like this in the dmesg buffer:

in6_purgeaddr: err=65, destination address delete failed
lo0: link state changed to DOWN
lo0: link state changed to UP
Link state changed to down
em0: link state changed to DOWN
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0


there is a mailing list thread about the issue here:
https://lists.freebsd.org/pipermail/freebsd-current/2018-September/071408.html


my device info via pciconf:
em0@pci0:0:31:6:        class=0x020000 card=0x30d017aa chip=0x15b78086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Ethernet Connection (2) I219-LM'
    class      = network
    subclass   = ethernet
Comment 1 Graham Perrin 2018-10-02 00:36:52 UTC
> CURRENT

Please, which revision? 

From <https://lists.freebsd.org/pipermail/freebsd-current/2018-September/071331.html>: 

>> I just fixed a bug in devd that would cause this, …

(I replied to the list, my reply is not yet archived.)
Comment 2 Graham Perrin 2018-10-02 00:41:23 UTC
> … not yet archived.)

Sorry, I was looking at the wrong month. Found: 

FreeBSD 12.0-ALPHA7 em0 networking with resume from suspend: OK
<https://lists.freebsd.org/pipermail/freebsd-current/2018-October/071456.html>
Comment 3 pete 2018-10-02 02:34:52 UTC
I can confirm that this works after updating my system to:

12.0-ALPHA8 b6728160ea4(master)

(hash is from the github mirror).  so i think we can close this as we are all set.  Thanks for the heads up Graham!
Comment 4 Chris 2019-01-20 11:56:00 UTC
Not sure if I should reply to a closed bug. I am unable to use the network after suspend/resume with a 12.0-RELEASE r341666 GENERIC amd64 kernel.

Suspend/resume works, except there is no network traffic. ifconfig down/up does not restore it. There have been times where it did resume properly, but usually does not.

dmesg:
em0: TX(0) desc avail = 1024, pidx = 0
em0: TX(0) desc avail = 1024, pidx = 0

pciconf:
em0@pci0:0:31:6:        class=0x020000 card=0x86721043 chip=0x15b88086 rev=0x31 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Ethernet Connection (2) I219-V'
    class      = network
    subclass   = ethernet
Comment 5 Michael Dexter 2019-01-21 21:22:50 UTC
I can confirm this issue on 12.0R with the Intel Corporation 82579LM Lewisville em device in an HP Z420. This issues does not appear to be ready for resolved status.
Comment 6 Kurt Jaeger freebsd_committer 2019-01-21 21:43:11 UTC
Please look at the patch in PR#224059 and check if the problem is solved if this patch is applied. The patch is only in 12-STABLE, so post-12.0p2
Comment 7 Chris 2019-01-22 17:15:47 UTC
I have applied the patch from PR#224059 and suspended my machine at least 8 times today without any issues. Thanks!

Do we know if 12.0 will be updated, or will I need to keep applying the patch until 12.1 is released?
Comment 8 Kurt Jaeger freebsd_committer 2019-01-22 20:44:22 UTC
rgrimes mentioned that some work is in progress to have an errata+fix
for this and other network-related fixes.
Comment 9 link_gun2004+bugZFBSD 2019-02-09 00:34:17 UTC
It worked with the Patch from PR#224059, but since the latest Update (12.0-RELEASE-p3) its broken again.
Comment 10 Krystian Bacławski 2019-03-29 16:19:48 UTC
Having applied the patch from PR#224059 to FreeBSD 12.0-RELEASE-p3 the problem with suspend/resume has vanished on Lenovo X230.