mirror of
https://github.com/opnsense/src.git
synced 2026-06-21 14:39:34 -04:00
Two reasons for this: we know it's a uart after we call probe and it returns successfully. Second, uart passes data between probe and attach with softc. As it is now, we call probe twice, once in the bidding process and once after bidding id done. However, the probe process for uart isn't completely idempotent (we change state of the uart sometimes). The second call can result in odd behavior (though so far only in buggy version of other code I've not committed). The bigger problem is the softc: newbus creates it, we populate it, then frees it when we don't return 0 to claim the device. It then calls us again, we repopulate it, and this time it doesn't free it before calling attach. Returning 0 avoids both of these issues. The justification for doing it in the commit that changed it was 'while I'm here', so there doesn't seem to be a use case for it. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47095 |
||
|---|---|---|
| .. | ||
| uart.h | ||
| uart_bus.h | ||
| uart_bus_acpi.c | ||
| uart_bus_fdt.c | ||
| uart_bus_isa.c | ||
| uart_bus_pci.c | ||
| uart_bus_puc.c | ||
| uart_bus_scc.c | ||
| uart_core.c | ||
| uart_cpu.h | ||
| uart_cpu_acpi.c | ||
| uart_cpu_acpi.h | ||
| uart_cpu_arm64.c | ||
| uart_cpu_fdt.c | ||
| uart_cpu_fdt.h | ||
| uart_cpu_powerpc.c | ||
| uart_cpu_x86.c | ||
| uart_dbg.c | ||
| uart_dev_imx.c | ||
| uart_dev_imx.h | ||
| uart_dev_lowrisc.c | ||
| uart_dev_lowrisc.h | ||
| uart_dev_msm.c | ||
| uart_dev_msm.h | ||
| uart_dev_mu.c | ||
| uart_dev_mvebu.c | ||
| uart_dev_ns8250.c | ||
| uart_dev_ns8250.h | ||
| uart_dev_pl011.c | ||
| uart_dev_quicc.c | ||
| uart_dev_snps.c | ||
| uart_dev_ti8250.c | ||
| uart_dev_z8530.c | ||
| uart_if.m | ||
| uart_ppstypes.h | ||
| uart_subr.c | ||
| uart_tty.c | ||