summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2017-03-01 18:19:46 +0000
committerian <ian@FreeBSD.org>2017-03-01 18:19:46 +0000
commit53e31f8307324a5c8b8a431dc84978e42ead628f (patch)
tree14b304ee8033290f18b57aa13f2443f260a95642 /sys/dev/usb/serial
parentd36a9529b462413c1efdce9ef8cacd9bae6d4833 (diff)
downloadFreeBSD-src-53e31f8307324a5c8b8a431dc84978e42ead628f.zip
FreeBSD-src-53e31f8307324a5c8b8a431dc84978e42ead628f.tar.gz
MFC r303346:
Actually return line status register values from umoscom_cfg_get_status(). The hardware delivers ns16550-compatible status bits, which is what the usb_serial code expects, so no need for translation, no need for a local variable to hold a temporary lsr result.
Diffstat (limited to 'sys/dev/usb/serial')
-rw-r--r--sys/dev/usb/serial/umoscom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/serial/umoscom.c b/sys/dev/usb/serial/umoscom.c
index 8c580da..daa83c5 100644
--- a/sys/dev/usb/serial/umoscom.c
+++ b/sys/dev/usb/serial/umoscom.c
@@ -523,14 +523,16 @@ static void
umoscom_cfg_get_status(struct ucom_softc *ucom, uint8_t *p_lsr, uint8_t *p_msr)
{
struct umoscom_softc *sc = ucom->sc_parent;
- uint8_t lsr;
uint8_t msr;
DPRINTFN(5, "\n");
- /* read status registers */
+ /*
+ * Read status registers. MSR bits need translation from ns16550 to
+ * SER_* values. LSR bits are ns16550 in hardware and ucom.
+ */
- lsr = umoscom_cfg_read(sc, UMOSCOM_LSR);
+ *p_lsr = umoscom_cfg_read(sc, UMOSCOM_LSR);
msr = umoscom_cfg_read(sc, UMOSCOM_MSR);
/* translate bits */
OpenPOWER on IntegriCloud