From owner-freebsd-current@FreeBSD.ORG Mon Nov 21 17:15:23 2011 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 4FF911065679; Mon, 21 Nov 2011 17:15:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id EBB778FC14; Mon, 21 Nov 2011 17:15:22 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pALH9i5D060437 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 21 Nov 2011 10:09:46 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201111211126.15627.jhb@freebsd.org> Date: Mon, 21 Nov 2011 10:09:37 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8D7CE344-05B3-4A48-8E5B-91100A48F0B1@bsdimp.com> References: <201111211126.15627.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 21 Nov 2011 10:09:47 -0700 (MST) Cc: freebsd-hackers@FreeBSD.org, FreeBSD-Current Subject: Re: Reprobing of devices after module load? 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: Mon, 21 Nov 2011 17:15:23 -0000 On Nov 21, 2011, at 9:26 AM, John Baldwin wrote: > On Friday, November 18, 2011 11:48:20 am Paul B. Mahol wrote: >> Hi, >>=20 >> Is there nice way in FreeBSD to force reprobe of devices for specific >> driver like it is done when kernel module is loaded (via >> DRIVER_MODULE(...) stuff)? >=20 > Note that those probes happen for specific buses rather than for = specific=20 > drivers. The routine that does this currently is static=20 > (devclass_driver_added() in sys/kern/subr_bus.c). What specific = problem are=20 > you trying to solve? You might be able to use BUS_DRIVER_ADDED() or=20= > device_probe_and_attach() to achieve what you are trying to do. You can load a dummy module that has an attach point to the bus that = you're wanting to force a rescan on. Warner