Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/serial/uvscom.c
Show First 20 Lines • Show All 316 Lines • ▼ Show 20 Lines | uvscom_attach(device_t dev) | ||||
sc->sc_line = UVSCOM_LINE_INIT; | sc->sc_line = UVSCOM_LINE_INIT; | ||||
/* clear stall at first run */ | /* clear stall at first run */ | ||||
mtx_lock(&sc->sc_mtx); | mtx_lock(&sc->sc_mtx); | ||||
usbd_xfer_set_stall(sc->sc_xfer[UVSCOM_BULK_DT_WR]); | usbd_xfer_set_stall(sc->sc_xfer[UVSCOM_BULK_DT_WR]); | ||||
usbd_xfer_set_stall(sc->sc_xfer[UVSCOM_BULK_DT_RD]); | usbd_xfer_set_stall(sc->sc_xfer[UVSCOM_BULK_DT_RD]); | ||||
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, | ||||
&uvscom_callback, &sc->sc_mtx); | &uvscom_callback, &sc->sc_mtx, uaa->device); | ||||
if (error) { | if (error) { | ||||
goto detach; | goto detach; | ||||
} | } | ||||
ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); | ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); | ||||
/* start interrupt pipe */ | /* start interrupt pipe */ | ||||
mtx_lock(&sc->sc_mtx); | mtx_lock(&sc->sc_mtx); | ||||
usbd_transfer_start(sc->sc_xfer[UVSCOM_INTR_DT_RD]); | usbd_transfer_start(sc->sc_xfer[UVSCOM_INTR_DT_RD]); | ||||
▲ Show 20 Lines • Show All 439 Lines • Show Last 20 Lines |