Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/serial/ufoma.c
Show First 20 Lines • Show All 439 Lines • ▼ Show 20 Lines | ufoma_attach(device_t dev) | ||||
sc->sc_modetoactivate = mad->bMode[0]; | sc->sc_modetoactivate = mad->bMode[0]; | ||||
/* clear stall at first run, if any */ | /* clear stall at first run, if any */ | ||||
mtx_lock(&sc->sc_mtx); | mtx_lock(&sc->sc_mtx); | ||||
usbd_xfer_set_stall(sc->sc_bulk_xfer[UFOMA_BULK_ENDPT_WRITE]); | usbd_xfer_set_stall(sc->sc_bulk_xfer[UFOMA_BULK_ENDPT_WRITE]); | ||||
usbd_xfer_set_stall(sc->sc_bulk_xfer[UFOMA_BULK_ENDPT_READ]); | usbd_xfer_set_stall(sc->sc_bulk_xfer[UFOMA_BULK_ENDPT_READ]); | ||||
mtx_unlock(&sc->sc_mtx); | mtx_unlock(&sc->sc_mtx); | ||||
error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, | error = ucom_attach_usb(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, | ||||
&ufoma_callback, &sc->sc_mtx); | &ufoma_callback, &sc->sc_mtx, uaa->device); | ||||
if (error) { | if (error) { | ||||
DPRINTF("ucom_attach failed\n"); | DPRINTF("ucom_attach failed\n"); | ||||
goto detach; | goto detach; | ||||
} | } | ||||
ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); | ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); | ||||
/*Sysctls*/ | /*Sysctls*/ | ||||
sctx = device_get_sysctl_ctx(dev); | sctx = device_get_sysctl_ctx(dev); | ||||
▲ Show 20 Lines • Show All 813 Lines • Show Last 20 Lines |