device_detach() on a device used by ixgbe driver (FreeBSD
7-STABLE through to 9-CURRENT)
John Baldwin
jhb at freebsd.org
Tue May 24 11:55:41 UTC 2011
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<domain>.<bus>.<slot>.<function>.disabled=1'
tunable).
--
John Baldwin
More information about the freebsd-hackers
mailing list