From owner-freebsd-current@FreeBSD.ORG Thu Sep 24 10:09:22 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6921C106566B for ; Thu, 24 Sep 2009 10:09:22 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by mx1.freebsd.org (Postfix) with ESMTP id DA8868FC14 for ; Thu, 24 Sep 2009 10:09:21 +0000 (UTC) Received: by bwz27 with SMTP id 27so1120366bwz.43 for ; Thu, 24 Sep 2009 03:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=3A0sobg8kpW+YLku7osntWs5Jf4M9ni8vqysvTfJAhc=; b=RM1d0bkHBqvr/SjqeWxQKX1a2iRV1gL+vgw6CSQoK65n7zmo+2NJP73DbClsuySSEp JlRa80Oq6qOx58sEJ3UURchlYrnaEDkFBmm1u4fr+sjTNEJZ26O4DKtdF/Vh2gsgMFZA HeT1MZMphFrslmCIizpMaDOO9QvrMu2fkRjXg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=m2mEdBFbmpGTI52hBihKVdpJF15BTg2zMnXzdy1/Dl/uu3epsXPLAXPD2lyaY5iSJf 93bJYD1SUjecp9HU516qfZ0FKhpFwaIjO51SsKuDk8RFlKbiI4VGhdpFVmGdcud88Yog 9dFr8qbXk6yPfz0WESbZbxxj7pwtnYxDs38AM= Received: by 10.204.24.71 with SMTP id u7mr2912096bkb.35.1253785002142; Thu, 24 Sep 2009 02:36:42 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 2sm2665118fks.3.2009.09.24.02.36.41 (version=SSLv3 cipher=RC4-MD5); Thu, 24 Sep 2009 02:36:41 -0700 (PDT) Sender: Alexander Motin Message-ID: <4ABB3DA6.5090004@FreeBSD.org> Date: Thu, 24 Sep 2009 12:36:38 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Jaakko Heinonen References: <20090923055647.GA2183@a91-153-125-115.elisa-laajakaista.fi> <4ABA5566.8010406@FreeBSD.org> <4ABA5B13.9050208@freebsd.org> <4ABA5C39.7090007@FreeBSD.org> <20090924060805.GA2057@a91-153-125-115.elisa-laajakaista.fi> In-Reply-To: <20090924060805.GA2057@a91-153-125-115.elisa-laajakaista.fi> X-Enigmail-Version: 0.96.0 Content-Type: multipart/mixed; boundary="------------040400020805010509010905" Cc: Peter Holm , scottl@freebsd.org, Andriy Gapon , FreeBSD-Current , Thomas Quinot , Kostik Belousov Subject: Re: Fwd: core dump on kldload atapicam 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: Thu, 24 Sep 2009 10:09:22 -0000 This is a multi-part message in MIME format. --------------040400020805010509010905 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jaakko Heinonen wrote: > On 2009-09-23, Alexander Motin wrote: >> Then please explain me how it happens. I don't think that explanation >> "it just works" sufficient. >> >> Any ideas what needed to reproduce that? Because it looks like not going >> to fall in my case: > > It happens if a parent ata device is not attached. I can reproduce the > problem on system which hash ata0, ata2 and ata3 devices but ata1 fails > to probe. Nice catch. I think it is newbus problem, not ata. I am able to simulate this problem locally and attached patch fixes it. Any objections? -- Alexander Motin --------------040400020805010509010905 Content-Type: text/plain; name="subr_bus.c.newdrv.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="subr_bus.c.newdrv.patch" --- subr_bus.c.prev 2009-09-15 20:44:39.000000000 +0300 +++ subr_bus.c 2009-09-24 12:24:35.000000000 +0300 @@ -1017,7 +1017,7 @@ devclass_driver_added(devclass_t dc, dri * Call BUS_DRIVER_ADDED for any existing busses in this class. */ for (i = 0; i < dc->maxunit; i++) - if (dc->devices[i]) + if (dc->devices[i] && device_is_attached(dc->devices[i])) BUS_DRIVER_ADDED(dc->devices[i], driver); /* --------------040400020805010509010905--