if_em.c prevents the 2nd time resuming

From: Taku YAMAMOTO <taku_at_tackymt.homeip.net>
Date: Sat, 1 May 2010 17:12:52 +0900
Greetings,

I found a bug in if_em.c which triggers a panic when resuming from the 2nd
suspend. (sleep, wakeup, sleep and wakeup will result to a panic)

It seems it has got introduced by r206001 (head) or r206211 (stable/8).

I guess the following change mistakenly slipped into em_resume() which is
completely bogus (suppose these lines should go into em_detach()?):

_at__at_ -769,6 +774,9 _at__at_ 
 	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);

Should I file a PR?

Virtually yours,
-- 
-|-__   YAMAMOTO, Taku
 | __ <     <taku_at_tackymt.homeip.net>

      - A chicken is an egg's way of producing more eggs. -
Received on Sat May 01 2010 - 06:28:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:03 UTC