From owner-freebsd-usb@freebsd.org Wed Sep 28 16:20:09 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7041CC01713 for ; Wed, 28 Sep 2016 16:20:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CED71D0B for ; Wed, 28 Sep 2016 16:20:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id C91AC10AF52; Wed, 28 Sep 2016 12:20:06 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky Cc: Jan Henrik Sylvester , FreeBSD-USB Mailing List Subject: Re: Status of PCIe Hotplug? Date: Wed, 28 Sep 2016 09:08:48 -0700 Message-ID: <1635480.htdnZkDgDb@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <3c6ab189-aad0-2593-1d3c-f221de294174@janh.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 28 Sep 2016 12:20:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 16:20:09 -0000 On Wednesday, September 28, 2016 11:55:47 AM Hans Petter Selasky wrote: > On 09/28/16 11:31, Jan Henrik Sylvester wrote: > > On 09/28/2016 10:32, Hans Petter Selasky wrote: > >> Can you compile your kernel with debugging enabled so that we get the > >> sourcelines in the dump below. Also please include some parts of the > > > > The kernel is from the yet-to-be-released 11.0-RELEASE installed by > > freebsd-update. Now I have extracted kernel-dbg.txz, base-dbg.txz, and > > lib32-dbg.txz from the 11.0-RELEAESE distribution, but the backtrace > > still looks similar. Do have have to do anything else to use the debug > > symbols or do I really have to compile a new kernel? > > > > Hi, > > Can you try the attached patch. Does it make any difference? > > device_delete_child() will delete devices starting at the leaves, while > USB expects parents to be detached first. > > jhb: Any comments? This is fine, though I feel like we should fix device_delete_child instead as this has broken several places. That is, I think device_delete_child should do the detach first and then delete any dangling grandchildren after device_detach() of the child. -- John Baldwin