From owner-freebsd-hackers@FreeBSD.ORG Tue May 24 11:55:41 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8165F106564A for ; Tue, 24 May 2011 11:55:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 585008FC1B for ; Tue, 24 May 2011 11:55:41 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 064C146B2C; Tue, 24 May 2011 07:55:41 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 99FA78A051; Tue, 24 May 2011 07:55:40 -0400 (EDT) From: John Baldwin To: Andrew Boyer Date: Tue, 24 May 2011 07:49:53 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <4DDA6B95.3090704@soeberg.net> <201105231032.20084.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201105240749.53149.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 24 May 2011 07:55:40 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, philip-freebsd1@soeberg.net Subject: Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 11:55:41 -0000 On Monday, May 23, 2011 3:08:05 pm Andrew Boyer wrote: > > On May 23, 2011, at 10:32 AM, John Baldwin wrote: > > > On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() > >> in it's attach() function, so that we can disable specific adapters > >> through kenv hint.ix.0.disabled=1.. > > > > That is not universally supported (i.e. it's not a part of new-bus > > specifically). For buses that support hinted devices, they do all generally > > support being able to disable a hinted device, but disabling bus- enumerated > > devices is not generally supported. > > > > FYI, I submitted a patch to Jack to add this in all of the e1000/ixgbe drivers. Setting a disabled="1" hint causes the attach to fail with ENXIO. I don't know if it's 'correct' or not but it serves a purpose in our testing and I thought it would be useful for others. One patch I have had for a while is a way to disable specific PCI devices, but that's not quite the same thing as it disables all drivers for a given device. (It adds support for a 'hw.pci....disabled=1' tunable). -- John Baldwin