From owner-freebsd-usb@freebsd.org Wed Sep 28 09:50:58 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 9D677BE839A for ; Wed, 28 Sep 2016 09:50:58 +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 60D6A188E; Wed, 28 Sep 2016 09:50:57 +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 D2D481FE023; Wed, 28 Sep 2016 11:50:55 +0200 (CEST) Subject: Re: Status of PCIe Hotplug? To: Jan Henrik Sylvester References: <791ee95b-ab4e-f07e-6b8d-0e0b6c49ceb0@janh.de> <58f84457-d775-3023-5727-a326bc8df722@FreeBSD.org> <05657098-a8dd-9d0d-ea75-4c3fdc582795@selasky.org> <3c6ab189-aad0-2593-1d3c-f221de294174@janh.de> Cc: FreeBSD-USB Mailing List , John Baldwin From: Hans Petter Selasky Message-ID: Date: Wed, 28 Sep 2016 11:55:47 +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: <3c6ab189-aad0-2593-1d3c-f221de294174@janh.de> Content-Type: multipart/mixed; boundary="------------908F5286AF0D6C6BF8D8F573" 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 09:50:58 -0000 This is a multi-part message in MIME format. --------------908F5286AF0D6C6BF8D8F573 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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? --HPS --------------908F5286AF0D6C6BF8D8F573 Content-Type: text/x-patch; name="pci_pci.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pci_pci.c.diff" Index: sys/dev/pci/pci_pci.c =================================================================== --- sys/dev/pci/pci_pci.c (revision 306255) +++ sys/dev/pci/pci_pci.c (working copy) @@ -1217,7 +1217,8 @@ } } else { if (sc->child != NULL) { - if (device_delete_child(dev, sc->child) == 0) + if (device_detach(sc->child) == 0 && + device_delete_child(dev, sc->child) == 0) sc->child = NULL; } } --------------908F5286AF0D6C6BF8D8F573--