From owner-freebsd-current@FreeBSD.ORG Sat May 1 08:28:11 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA5CF106566C for ; Sat, 1 May 2010 08:28:11 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (7c2945a0.i-revonet.jp [124.41.69.160]) by mx1.freebsd.org (Postfix) with ESMTP id 878208FC1B for ; Sat, 1 May 2010 08:28:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id 85F9B10749; Sat, 1 May 2010 17:12:54 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost ([127.0.0.1]) by localhost (basalt.tackymt.homeip.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id otfaQkoNBYe5; Sat, 1 May 2010 17:12:52 +0900 (JST) Received: from basalt.tackymt.homeip.net (basalt.tackymt.homeip.net [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by basalt.tackymt.homeip.net (Postfix) with ESMTP; Sat, 1 May 2010 17:12:52 +0900 (JST) Date: Sat, 1 May 2010 17:12:52 +0900 From: Taku YAMAMOTO To: Jack Vogel Message-Id: <20100501171252.e05f257f.taku@tackymt.homeip.net> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: if_em.c prevents the 2nd time resuming X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 08:28:11 -0000 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()?): @@ -769,6 +774,9 @@ 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 | __ < - A chicken is an egg's way of producing more eggs. -