Otherwise mlx5 unconditionally prints messages to the dmesg during boot,
even when there is no hardware for it to drive.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 37652 Build 34541: arc lint + arc unit
Event Timeline
Need to check this a bit. I will come back on monday with a final answer.
BTW: There is a macro in the LinuxKPI, PRINTK ONCE or something like that, which does exactly like you do. Maybe use that?
sys/dev/mlx5/mlx5_core/mlx5_main.c | ||
---|---|---|
1328 ↗ | (On Diff #85772) | This reintroduces the problem. The line is printed even if no mlx5 hw is present. We already call device_set_desc() here, that ensures that mlx5_version will be printed immediately before attach. Also there is a newline missing I think. |
sys/dev/mlx5/mlx5_core/mlx5_main.c | ||
---|---|---|
1328 ↗ | (On Diff #85772) | No, this is not the device_probe(). This is the device_attach(), and the device_set_desc() is only visible to the sysctl tree. We actually set it too late for it to show up in dmesg :-( Should work. Can you test it? Or are you sure? |
sys/dev/mlx5/mlx5_core/mlx5_main.c | ||
---|---|---|
1328 ↗ | (On Diff #85772) | Sorry, I tested it, you are right. I missed that Linux "probe" is FreeBSD "attach". We should remove the device_set_desc() call then. |
Right now we want both, due to some internal QA/regression tools. Else you are right! Thanks for reviewing.