Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/serial/u3g.c
Show First 20 Lines • Show All 985 Lines • ▼ Show 20 Lines | if (nports == U3G_MAXPORTS) | ||||
break; | break; | ||||
} | } | ||||
if (nports == 0) { | if (nports == 0) { | ||||
device_printf(dev, "no ports found\n"); | device_printf(dev, "no ports found\n"); | ||||
goto detach; | goto detach; | ||||
} | } | ||||
sc->sc_numports = nports; | sc->sc_numports = nports; | ||||
error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, | error = ucom_attach_usb(&sc->sc_super_ucom, sc->sc_ucom, | ||||
sc->sc_numports, sc, &u3g_callback, &sc->sc_mtx); | sc->sc_numports, sc, &u3g_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); | ||||
device_printf(dev, "Found %u port%s.\n", sc->sc_numports, | device_printf(dev, "Found %u port%s.\n", sc->sc_numports, | ||||
sc->sc_numports > 1 ? "s":""); | sc->sc_numports > 1 ? "s":""); | ||||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |