Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/serial/uplcom.c
Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Lines | if (sc->sc_chiptype == TYPE_PL2303) { | ||||
if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, | if (uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, | ||||
UPLCOM_SET_REQUEST, 8, 0, 0) || | UPLCOM_SET_REQUEST, 8, 0, 0) || | ||||
uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, | uplcom_pl2303_do(sc->sc_udev, UT_WRITE_VENDOR_DEVICE, | ||||
UPLCOM_SET_REQUEST, 9, 0, 0)) { | UPLCOM_SET_REQUEST, 9, 0, 0)) { | ||||
goto detach; | goto detach; | ||||
} | } | ||||
} | } | ||||
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, | ||||
&uplcom_callback, &sc->sc_mtx); | &uplcom_callback, &sc->sc_mtx, uaa->device); | ||||
if (error) { | if (error) { | ||||
goto detach; | goto detach; | ||||
} | } | ||||
/* | /* | ||||
* do the initialization during attach so that the system does not | * do the initialization during attach so that the system does not | ||||
* sleep during open: | * sleep during open: | ||||
*/ | */ | ||||
if (uplcom_pl2303_init(uaa->device, sc->sc_chiptype)) { | if (uplcom_pl2303_init(uaa->device, sc->sc_chiptype)) { | ||||
▲ Show 20 Lines • Show All 586 Lines • Show Last 20 Lines |