Page MenuHomeFreeBSD

D61620.1794935919.diff
No OneTemporary

Authored By
Unknown
Size
902 B
Referenced Files
None
Subscribers
None

D61620.1794935919.diff

diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h
--- a/sys/dev/uart/uart.h
+++ b/sys/dev/uart/uart.h
@@ -47,8 +47,11 @@
u_int regiowidth;
u_int busy_detect;
u_int rclk_guess;/* if rclk == 0, use baud + divisor to compute rclk */
+ u_int flags;
};
+#define UART_BAS_IN_PROBE 0x0001 /* softc is still a plain uart_softc */
+
#define uart_regofs(bas, reg) ((reg) << (bas)->regshft)
#define uart_regiowidth(bas) ((bas)->regiowidth)
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c
--- a/sys/dev/uart/uart_core.c
+++ b/sys/dev/uart/uart_core.c
@@ -569,7 +569,10 @@
}
}
+ /* The class specific fields of the softc can't be used yet. */
+ sc->sc_bas.flags |= UART_BAS_IN_PROBE;
error = UART_PROBE(sc);
+ sc->sc_bas.flags &= ~UART_BAS_IN_PROBE;
bus_release_resource(dev, sc->sc_rtype, sc->sc_rrid, sc->sc_rres);
return ((error) ? error : 0);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 17, 5:18 PM (17 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41800433
Default Alt Text
D61620.1794935919.diff (902 B)

Event Timeline