summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/uchcom.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-09-28 08:13:50 +0000
committerthompsa <thompsa@FreeBSD.org>2009-09-28 08:13:50 +0000
commit13d838412ee1a5baf94fb9b55a431ce623224b08 (patch)
tree39e3fc986c08889a952fde852979e4dd3750db62 /sys/dev/usb/serial/uchcom.c
parentd391f7f701010877a646fc92eb55b394c3cf4a08 (diff)
downloadFreeBSD-src-13d838412ee1a5baf94fb9b55a431ce623224b08.zip
FreeBSD-src-13d838412ee1a5baf94fb9b55a431ce623224b08.tar.gz
Add experimental support for usb serial console and polled mode during DDB.
Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/serial/uchcom.c')
-rw-r--r--sys/dev/usb/serial/uchcom.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/usb/serial/uchcom.c b/sys/dev/usb/serial/uchcom.c
index 705d3e6..9ed63eb 100644
--- a/sys/dev/usb/serial/uchcom.c
+++ b/sys/dev/usb/serial/uchcom.c
@@ -230,6 +230,7 @@ static void uchcom_set_dte_rate(struct uchcom_softc *, uint32_t);
static void uchcom_set_line_control(struct uchcom_softc *, tcflag_t);
static void uchcom_clear_chip(struct uchcom_softc *);
static void uchcom_reset_chip(struct uchcom_softc *);
+static void uchcom_poll(struct ucom_softc *ucom);
static device_probe_t uchcom_probe;
static device_attach_t uchcom_attach;
@@ -280,6 +281,7 @@ static struct ucom_callback uchcom_callback = {
.ucom_stop_read = &uchcom_stop_read,
.ucom_start_write = &uchcom_start_write,
.ucom_stop_write = &uchcom_stop_write,
+ .ucom_poll = &uchcom_poll,
};
/* ----------------------------------------------------------------------
@@ -888,6 +890,13 @@ tr_setup:
}
}
+static void
+uchcom_poll(struct ucom_softc *ucom)
+{
+ struct uchcom_softc *sc = ucom->sc_parent;
+ usbd_transfer_poll(sc->sc_xfer, UCHCOM_N_TRANSFER);
+}
+
static device_method_t uchcom_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, uchcom_probe),
OpenPOWER on IntegriCloud