From owner-freebsd-usb@freebsd.org Wed Sep 28 17:32:06 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 0C7DBC0166D for ; Wed, 28 Sep 2016 17:32:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B1ACC; Wed, 28 Sep 2016 17:32:05 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5987E1FE023; Wed, 28 Sep 2016 19:32:02 +0200 (CEST) Subject: Re: Status of PCIe Hotplug? To: John Baldwin References: <3c6ab189-aad0-2593-1d3c-f221de294174@janh.de> <1635480.htdnZkDgDb@ralph.baldwin.cx> Cc: Jan Henrik Sylvester , FreeBSD-USB Mailing List From: Hans Petter Selasky Message-ID: Date: Wed, 28 Sep 2016 19:36:53 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1635480.htdnZkDgDb@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 17:32:06 -0000 On 09/28/16 18:08, John Baldwin wrote: > 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. > Hi John, I'm fine with that. Could you go through the tree and see if there are any places which require the opposite? Or do you want me to handle it? --HPS