From owner-freebsd-arch@FreeBSD.ORG Sat May 22 03:39:28 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E699D106566B for ; Sat, 22 May 2010 03:39:28 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 725FC8FC13 for ; Sat, 22 May 2010 03:39:28 +0000 (UTC) Received: by fxm4 with SMTP id 4so1761130fxm.13 for ; Fri, 21 May 2010 20:39:27 -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:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=UJpdTVumKYdMmXUawLgmaDEI/f23gdE2n45U6+FPIaA=; b=or8Pz3g+t4Vc/UO4Z7+/opAMN9f4AvhNVO4L0KWcvdTSvNl3ag9KP8xssNqtvnUg12 FZrlo/tiOLkKRj9dxdKi5Au5ti5cTWoriyGp4ULYeVstf7dZ79QmqC1W23TravdkjRLy h9XVJjdZxkVu970UdMfkZ9V3v2GFHlqwo7LBg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ghcBjxFiKou9wXP34IbNH7ia0VtdsUFVEjRXjamJv8syQyDHYYBbpl4YnUpMPcfa/W fnGl4EDtB3nP/I/lSFt9EHOUjM2kziTYzSMpbloJqo7r6PlBRWyYx9foUIQtTnCzHmFZ zk3KG4PI+3ESlV0JShnM371rZq+TUZZJfd8tE= Received: by 10.223.4.217 with SMTP id 25mr2198782fas.60.1274499566495; Fri, 21 May 2010 20:39:26 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 2sm7564998fav.13.2010.05.21.20.39.25 (version=SSLv3 cipher=RC4-MD5); Fri, 21 May 2010 20:39:26 -0700 (PDT) Sender: Alexander Motin Message-ID: <4BF751DD.7020701@FreeBSD.org> Date: Sat, 22 May 2010 06:39:09 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: freebsd-arch@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Device driver unload X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2010 03:39:29 -0000 Hi. I think we have some inconsistency around device driver unloading. When devices gets no driver during boot, bus driver receives BUS_PROBE_NOMATCH() call, allowing to power-down the device. But if device looses driver after module unload - nothing happens. So my question is: shouldn't we call either device_probe_and_attach() or BUS_PROBE_NOMATCH() for devices detached due to driver unload? If there is no alternative driver - device_probe_and_attach() also result in BUS_PROBE_NOMATCH() call. -- Alexander Motin