Commit 2ca40d0
devices: serial: assert THRE when the TX interrupt is enabled
A real 16550 raises the THRE (transmit-holding-register-empty) interrupt
the moment it is enabled while the THR is empty. CH flushes TX
synchronously, so the THR is always empty, but it only signalled THRE on
register writes, never on IER enable. Interrupt-driven TX drivers
(Windows serial.sys) that enable the interrupt and wait for THRE before
writing the first byte therefore deadlocked: the write timed out and no
bytes ever reached the host serial log. Assert thr_empty() on the IER
enable path so the first interrupt fires and TX progresses.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 026c1ff commit 2ca40d0
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
263 | 271 | | |
264 | 272 | | |
265 | 273 | | |
| |||
0 commit comments