kern/89837: PCI code outputs superfluous "failed to enable/disable memory/port mapping!" messages

Jeremy Chadwick freebsd at
Fri Dec 2 12:40:42 GMT 2005

>Number:         89837
>Category:       kern
>Synopsis:       PCI code outputs superfluous "failed to enable/disable memory/port mapping!" messages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 02 12:40:02 GMT 2005
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 6.0-STABLE i386
Parodius Networking
System: FreeBSD icarus.home.lan 6.0-STABLE FreeBSD 6.0-STABLE #0: Fri Dec 2 02:22:17 PST 2005 root at icarus.home.lan:/usr/obj/usr/src/sys/ICARUS i386
	The PCI code can under many configurations spit out the following kernel message:

	XXXpciXXX: failed to {enable|disable} {memory|port} mapping!

	This is output via device_printf() in sys/dev/pci/pci.c, lines ~677 and ~706.

	There have been numerous PRs and mailing list threads about what this message
	means (particularly the "failed to enable memory mapping!" message).  So far,
	every report I've seen that involves driver developers results in them saying
	"This message should only appear when bootverbose is enabled, so ignore it."

	I'm proposing that the above device_printf() calls be wrapped with a
	bootverbose check -- and ONLY for the device_printf() (not the return()).

	I'm sure there will be someone who will step up and say why this is a bad idea,
	blah blah blah, but I'll remind you that such messages on -STABLE need only
	appear when there _really_ is a problem, and not when "there isn't a problem
	but it's nice to know"; messages of this nature should be left for -CURRENT.

	If it's _really_ necessary, then users need something that explains what this
	message actually means (one can find such explanations in certain manpages,
	such as bge(4) -- but, at least in my case, it seems unlikely that my Intel
	ICH5 Southbridge, on an Intel motherboard nonetheless, would lack
	bus-mastering support :-) ).
	Not applicable.
	Wrap the device_printf() statements in sys/dev/pci/pci.c which output
	the aforementioned message with an "if (bootverbose)" conditional.

	I can provide a patch if someone doesn't want to deal with doing it.

	This matter should apply to both 5.x and 6.x kernels (and probably 7.x too).

More information about the freebsd-bugs mailing list