summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/serial/ufoma.c
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2010-11-03 21:50:49 +0000
committern_hibma <n_hibma@FreeBSD.org>2010-11-03 21:50:49 +0000
commit0850594b2bfebda9bb43e482518bfba7ab603377 (patch)
treed8dadea89d8c948ce0d2dfa99cdd1e2a720a6e54 /sys/dev/usb/serial/ufoma.c
parent06824871e773f65faaf3bc5bb9ca1d6d91f4711c (diff)
downloadFreeBSD-src-0850594b2bfebda9bb43e482518bfba7ab603377.zip
FreeBSD-src-0850594b2bfebda9bb43e482518bfba7ab603377.tar.gz
- Simplify the way unit/subunit allocation is done in ucom.
- hw.usb.ucom.cons_unit is now split into hw.usb.ucom.cons_unit/...cons_subunit. Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if a) a console was defined a USB serial devices, and a USB device with more than 1 subunit is present, and this device is attached before the device functioning as a console or b) a console was defined on a USB device with more than 1 subunit Reviewed by: hps MFC after: 2 weeks
Diffstat (limited to 'sys/dev/usb/serial/ufoma.c')
-rw-r--r--sys/dev/usb/serial/ufoma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/serial/ufoma.c b/sys/dev/usb/serial/ufoma.c
index e7d5a9d..5555ed5 100644
--- a/sys/dev/usb/serial/ufoma.c
+++ b/sys/dev/usb/serial/ufoma.c
@@ -466,7 +466,7 @@ ufoma_attach(device_t dev)
CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open,
"A", "Mode to transit when port is opened");
SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "comunit",
- CTLFLAG_RD, &(sc->sc_ucom.sc_unit), 0,
+ CTLFLAG_RD, &(sc->sc_super_ucom.sc_unit), 0,
"Unit number as USB serial");
return (0); /* success */
@@ -481,7 +481,7 @@ ufoma_detach(device_t dev)
{
struct ufoma_softc *sc = device_get_softc(dev);
- ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+ ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom);
usbd_transfer_unsetup(sc->sc_ctrl_xfer, UFOMA_CTRL_ENDPT_MAX);
usbd_transfer_unsetup(sc->sc_bulk_xfer, UFOMA_BULK_ENDPT_MAX);
OpenPOWER on IntegriCloud