Date: Wed, 27 Apr 2016 10:54:42 -0700 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298712 - in head/sys: dev/cardbus kern mips/nlm powerpc/ofw sparc64/pci sys Message-ID: <2789741.CjRGbn4rPl@ralph.baldwin.cx> In-Reply-To: <201604271749.u3RHngl6051451@repo.freebsd.org> References: <201604271749.u3RHngl6051451@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, April 27, 2016 05:49:42 PM John Baldwin wrote: > Author: jhb > Date: Wed Apr 27 17:49:42 2016 > New Revision: 298712 > URL: https://svnweb.freebsd.org/changeset/base/298712 > > Log: > Add a bus_null_rescan() method that always fails with an error. > > Use this in place of kobj_error_method to disable BUS_RESCAN() on > PCI drivers that do not use the "standard" scanning algorithm. This should fix the build. > Modified: > head/sys/dev/cardbus/cardbus.c > head/sys/kern/subr_bus.c > head/sys/mips/nlm/xlp_pci.c > head/sys/powerpc/ofw/ofw_pcibus.c > head/sys/sparc64/pci/ofw_pcibus.c > head/sys/sys/bus.h Note that some of these drivers could be changed to use the "standard" scanning algorithm and support rescans if they moved some of their custom scanning logic into a pci_child_added callback. This is generally true of all but cardbus except that the OFW busses use the OFW tree to drive scanning (so it seems they will add PCI devices that don't appear valid to a PCI scan but are in the OFW tree). I'm not sure how well that can work in practice as no PCI device driver is going to attach to a PCI device with a vendor ID of 0xffff (ACPI doesn't attempt to handle devices that show up in the ACPI namespace but not in a PCI scan). The xlp driver would just move the function-specific fixups into the pci_child_added callback (though the special interrupt routing is perhaps best done in PCI_ASSIGN_INTERRUPT or the like). OFW would walk the OFW tree to find the corresponding node (if one is found) and initialize the OFW ivars (similar to what ACPI does) in the callback. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2789741.CjRGbn4rPl>