Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Sep 1999 10:24:53 -0700
From:      Parag Patel <parag@cgt.com>
To:        freebsd-hackers@freebsd.org
Cc:        Sheldon Hearn <sheldonh@uunet.co.za>
Subject:   STABLE kern/13546: Too-verbose output from PCI probe at bootup
Message-ID:  <6746.936725093@pinhead.parag.codegen.com>

next in thread | raw e-mail | index | archive | help
Hello.  I recently submitted this kernel PR (13546) against STABLE, and
Sheldon Hearn suggested forwarding this note to freebsd-hackers to ask
for opinions.

The PCI probe code is much too verbose when it probes for PCI busses
that do not exist.  On this (4xPPro) system, I get this message:

    Probing for devices on PCI bus 2
    Probing for devices on PCI bus 3
    ...
    Probing for devices on PCI bus 255

nearly 255 times.  CURRENT does not display all these messages.

My fix for STABLE below simply puts the verbose messages under
"bootverbose", so the messages can still be displayed if one
boots "-v" but not otherwise.

  ***************
  *** 547,553 ****
	  while (bus <= bushigh) {
		  int newbushigh;

  !               printf("Probing for devices on PCI bus %d:\n", bus);
		  newbushigh = pci_probebus(bus);

		  if (bushigh < newbushigh)
  --- 547,555 ----
	  while (bus <= bushigh) {
		  int newbushigh;

  !               if (bootverbose)
  !                       printf("Probing for devices on PCI bus %d:\n", bus);
  !
		  newbushigh = pci_probebus(bus);

		  if (bushigh < newbushigh)


I looked over the PCI code in STABLE and CURRENT more closely.  The
CURRENT code does not display this message because the code is no longer
there!  CURRENT probes for and attaches PCI bridges as bus/devices and
STABLE does not.

In pci/pci.c, the STABLE version uses the "bushigh" return value from
pci_probebus() to determine the next PCI bus number to probe.  My guess
is that the 4xPPRO box I've got lies and always returns one more bus to
probe for this code.

CURRENT's pci/pci.c however doesn't use this "bushigh" information from
pci_add_children(), and indeed doesn't use its return value at all.
(The code determining bushigh can be deleted and pci_add_children should
return "void".)  It seems to detect the bridge chip and attach that as a
device and then probes under it.  STABLE doesn't seem to do this and
its code is scattered with XXX througout.

So I think my patch for simply wrapping the "Probing PCI bus" message
with an "if (bootverbose)" is the right solution/workaround for systems
like mine running STABLE.  Not that it's a big deal - it's easy enough
for me to patch by hand - but I thought that others may be similarly
afflicted.


	-- Parag Patel


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6746.936725093>