>Number: 146614 >Category: kern >Synopsis: if_em.c prevents the 2nd time resuming >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 15 12:50:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Taku YAMAMOTO >Release: 9.0-CURRENT(after r206001), 8.0-STABLE(after r206211) >Organization: Confortune Co., Ltd. >Environment: FreeBSD biotite.tackymt.homeip.net 9.0-CURRENT FreeBSD 9.0-CURRENT #190: Thu May 13 13:16:18 JST 2010 t...@biotite.tackymt.homeip.net:/home/taku/work/build/biotite/usr/src/sys/BIOTITE i386
FreeBSD truth.mskc.confortune.co.jp 8.0-STABLE FreeBSD 8.0-STABLE #10: Tue May 11 15:31:50 JST 2010 root@:/home/tackymt/work/build/truth/usr/src/sys/TRUTH i386 >Description: If we let a machine with an em interface suspend, resume then suspend again, the machine panics on the next resume. It seems this bug have got introduced by the changeset r206001(head) and r206211(stable/8). >How-To-Repeat: On a machine with em interface and working suspend, to suspend, resume, suspend again and then resume again will result to a panic. >Fix: The attached patch seems to fix the bug. (Tested on Thinkpad X60 and X61, 9.0-CURRENT and 8.0-STABLE respectively) I'm not so confident of the correctness of em_resume() part of the fix, though. Patch attached with submission follows: --- sys/dev/e1000/if_em.c.orig 2010-04-29 04:22:52.000000000 +0900 +++ sys/dev/e1000/if_em.c 2010-05-08 19:19:43.587862831 +0900 @@ -705,6 +705,9 @@ em_detach(device_t dev) return (EBUSY); } + if (adapter->led_dev != NULL) + led_destroy(adapter->led_dev); + #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) ether_poll_deregister(ifp); @@ -779,9 +782,6 @@ em_resume(device_t dev) struct adapter *adapter = device_get_softc(dev); struct ifnet *ifp = adapter->ifp; - if (adapter->led_dev != NULL) - led_destroy(adapter->led_dev); - EM_CORE_LOCK(adapter); em_init_locked(adapter); em_init_manageability(adapter); >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"