sys/dev/usbmisc/ucom/ucom.c
static usbd_status
ucomstartread(struct ucom_softc *sc)
{
	usbd_status err;

	ASSERT_LWKT_TOKEN_HELD(&tty_token);
	DPRINTF(("ucomstartread: start\n"));

	sc->sc_state &= ~UCS_RXSTOP;

	if (sc->sc_bulkin_pipe == NULL)
		return (USBD_NORMAL_COMPLETION);

	usbd_setup_xfer(sc->sc_ixfer, sc->sc_bulkin_pipe,
			(usbd_private_handle)sc,
			sc->sc_ibuf, sc->sc_ibufsize,
			USBD_SHORT_XFER_OK | USBD_NO_COPY,
			USBD_NO_TIMEOUT, ucomreadcb);

	err = usbd_transfer(sc->sc_ixfer);
	if (err != USBD_IN_PROGRESS) {
		DPRINTF(("ucomstartread: err = %s\n", usbd_errstr(err)));
		return (err);
	}

	return (USBD_NORMAL_COMPLETION);
}
/*
 * NOTE: Must be called with tty_token held
 */
Must be called with tty_token held
Must be called with tty_token held
static usbd_status
ucomstartread(struct ucom_softc *sc)
{
	usbd_status err;
	ASSERT_LWKT_TOKEN_HELD(&tty_token);
	DPRINTF(("ucomstartread: start\n"));
	sc->sc_state &= ~UCS_RXSTOP;
	if (sc->sc_bulkin_pipe == NULL)
		return (USBD_NORMAL_COMPLETION);
	usbd_setup_xfer(sc->sc_ixfer, sc->sc_bulkin_pipe,
			(usbd_private_handle)sc,
			sc->sc_ibuf, sc->sc_ibufsize,
			USBD_SHORT_XFER_OK | USBD_NO_COPY,
			USBD_NO_TIMEOUT, ucomreadcb);
	err = usbd_transfer(sc->sc_ixfer);
	if (err != USBD_IN_PROGRESS) {
		DPRINTF(("ucomstartread: err = %s\n", usbd_errstr(err)));
		return (err);
	}
	return (USBD_NORMAL_COMPLETION);
}
static usbd_status ucomstartread ( struct ucom_softc * sc ) { usbd_status err ; ASSERT_LWKT_TOKEN_HELD ( & tty_token ) ; DPRINTF ( ( " \n " ) ) ; sc -> sc_state &= ~ UCS_RXSTOP ; if ( sc -> sc_bulkin_pipe == NULL ) return ( USBD_NORMAL_COMPLETION ) ; usbd_setup_xfer ( sc -> sc_ixfer , sc -> sc_bulkin_pipe , ( usbd_private_handle ) sc , sc -> sc_ibuf , sc -> sc_ibufsize , USBD_SHORT_XFER_OK | USBD_NO_COPY , USBD_NO_TIMEOUT , ucomreadcb ) ; err = usbd_transfer ( sc -> sc_ixfer ) ; if ( err != USBD_IN_PROGRESS ) { DPRINTF ( ( " \n " , usbd_errstr ( err ) ) ) ; return ( err ) ; } return ( USBD_NORMAL_COMPLETION ) ; }
NOTE: Must be called with tty_token held
NOTE : Must be called with tty_token held