| 503 | } |
| 504 | |
| 505 | static int |
| 506 | oct16550_bus_getsig (struct uart_softc *sc) |
| 507 | { |
| 508 | uint32_t new, old, sig; |
| 509 | uint8_t msr; |
| 510 | |
| 511 | do { |
| 512 | old = sc->sc_hwsig; |
| 513 | sig = old; |
| 514 | uart_lock(sc->sc_hwmtx); |
| 515 | msr = uart_getreg(&sc->sc_bas, REG_MSR); |
| 516 | uart_unlock(sc->sc_hwmtx); |
| 517 | SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR); |
| 518 | SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS); |
| 519 | SIGCHG(msr & MSR_DCD, sig, SER_DCD, SER_DDCD); |
| 520 | SIGCHG(msr & MSR_RI, sig, SER_RI, SER_DRI); |
| 521 | new = sig & ~SER_MASK_DELTA; |
| 522 | } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); |
| 523 | return (sig); |
| 524 | } |
| 525 | |
| 526 | static int |
| 527 | oct16550_bus_ioctl (struct uart_softc *sc, int request, intptr_t data) |
no test coverage detected