diff options
author | Luiz Souza <luiz@netgate.com> | 2018-03-09 03:05:04 -0300 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-03-08 21:51:43 -0600 |
commit | 0e9eabe9801fa38e44b9e421f643f4b4431b93f3 (patch) | |
tree | d8cf93e97757803bb2e01fd509a2a1a6da52a97c | |
parent | eb062d93722e51c4cfd19786b208db635bc6688a (diff) | |
download | FreeBSD-src-0e9eabe9801fa38e44b9e421f643f4b4431b93f3.zip FreeBSD-src-0e9eabe9801fa38e44b9e421f643f4b4431b93f3.tar.gz |
Hide some debug messages under bootverbose.
(cherry picked from commit 0714468531f9e33c8f85bafa260c92d55c11ff88)
-rw-r--r-- | sys/dev/etherswitch/e6000sw/e6000sw.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/dev/etherswitch/e6000sw/e6000sw.c b/sys/dev/etherswitch/e6000sw/e6000sw.c index b7e8fb1..4d711b6 100644 --- a/sys/dev/etherswitch/e6000sw/e6000sw.c +++ b/sys/dev/etherswitch/e6000sw/e6000sw.c @@ -472,7 +472,8 @@ e6000sw_parse_child_fdt(e6000sw_softc_t *sc, phandle_t child, int *pport) if (OF_getprop_alloc(child, "label", 1, (void **)&portlabel) > 0) { if (strncmp(portlabel, "cpu", 3) == 0) { - device_printf(sc->dev, "CPU port at %d\n", port); + if (bootverbose) + device_printf(sc->dev, "CPU port at %d\n", port); sc->cpuports_mask |= (1 << port); sc->fixed_mask |= (1 << port); } @@ -496,10 +497,12 @@ e6000sw_parse_child_fdt(e6000sw_softc_t *sc, phandle_t child, int *pport) } free(name, M_OFWPROP); } - if ((sc->fixed_mask & (1 << port)) != 0) - device_printf(sc->dev, "fixed port at %d\n", port); - else - device_printf(sc->dev, "PHY at port %d\n", port); + if (bootverbose) { + if ((sc->fixed_mask & (1 << port)) != 0) + device_printf(sc->dev, "fixed port at %d\n", port); + else + device_printf(sc->dev, "PHY at port %d\n", port); + } return (0); } @@ -540,6 +543,8 @@ e6000sw_parse_hinted_port(e6000sw_softc_t *sc, int port) if (err == 0 && val != 0) { sc->cpuports_mask |= (1 << port); sc->fixed_mask |= (1 << port); + if (bootverbose) + device_printf(sc->dev, "CPU port at %d\n", port); } err = e6000sw_check_hint_val(sc->dev, &val, "port%dspeed", port); if (err == 0 && val != 0) { @@ -548,6 +553,13 @@ e6000sw_parse_hinted_port(e6000sw_softc_t *sc, int port) sc->fixed25_mask |= (1 << port); } + if (bootverbose) { + if ((sc->fixed_mask & (1 << port)) != 0) + device_printf(sc->dev, "fixed port at %d\n", port); + else + device_printf(sc->dev, "PHY at port %d\n", port); + } + return (0); } #endif |