diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2005-01-10 11:58:53 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2005-01-10 11:58:53 +0000 |
commit | 2ba2e9c431f5064e237b2e54f6f2a6b86b2ac07c (patch) | |
tree | 361049c9646a48fa4cfc2446476a25e47ab4dea0 /sys/dev/usb/uplcom.c | |
parent | 904907a5fdbb96650fa67391bc667417cfdfd2f4 (diff) |
from freebsd, uplcom.c revision 1.23:
Add support for CTS modemsignal as well.
RI does not seem to be supported.
Diffstat (limited to 'sys/dev/usb/uplcom.c')
-rw-r--r-- | sys/dev/usb/uplcom.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index 625a8210d9f..0b8eb134e0d 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uplcom.c,v 1.16 2004/10/26 00:37:07 jsg Exp $ */ +/* $OpenBSD: uplcom.c,v 1.17 2005/01/10 11:58:52 dlg Exp $ */ /* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -83,6 +83,7 @@ int uplcomdebug = 0; #define UPLCOM_SET_REQUEST 0x01 #define UPLCOM_SET_CRTSCTS 0x41 +#define RSAQ_STATUS_CTS 0x80 #define RSAQ_STATUS_DSR 0x02 #define RSAQ_STATUS_DCD 0x01 @@ -705,10 +706,18 @@ uplcom_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) sc->sc_lsr = sc->sc_msr = 0; pstatus = buf[8]; + if (ISSET(pstatus, RSAQ_STATUS_CTS)) + sc->sc_msr |= UMSR_CTS; + else + sc->sc_msr &= ~UMSR_CTS; if (ISSET(pstatus, RSAQ_STATUS_DSR)) sc->sc_msr |= UMSR_DSR; + else + sc->sc_msr &= ~UMSR_DSR; if (ISSET(pstatus, RSAQ_STATUS_DCD)) sc->sc_msr |= UMSR_DCD; + else + sc->sc_msr &= ~UMSR_DCD; ucom_status_change((struct ucom_softc *) sc->sc_subdev); } |