diff options
Diffstat (limited to 'sys/dev/usb/serial/uvscom.c')
-rw-r--r-- | sys/dev/usb/serial/uvscom.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/sys/dev/usb/serial/uvscom.c b/sys/dev/usb/serial/uvscom.c index a784ec4..0fb7792 100644 --- a/sys/dev/usb/serial/uvscom.c +++ b/sys/dev/usb/serial/uvscom.c @@ -130,11 +130,11 @@ enum { }; struct uvscom_softc { - struct usb2_com_super_softc sc_super_ucom; - struct usb2_com_softc sc_ucom; + struct ucom_super_softc sc_super_ucom; + struct ucom_softc sc_ucom; - struct usb2_xfer *sc_xfer[UVSCOM_N_TRANSFER]; - struct usb2_device *sc_udev; + struct usb_xfer *sc_xfer[UVSCOM_N_TRANSFER]; + struct usb_device *sc_udev; struct mtx sc_mtx; uint16_t sc_line; /* line control register */ @@ -156,24 +156,24 @@ static usb2_callback_t uvscom_write_callback; static usb2_callback_t uvscom_read_callback; static usb2_callback_t uvscom_intr_callback; -static void uvscom_cfg_set_dtr(struct usb2_com_softc *, uint8_t); -static void uvscom_cfg_set_rts(struct usb2_com_softc *, uint8_t); -static void uvscom_cfg_set_break(struct usb2_com_softc *, uint8_t); -static int uvscom_pre_param(struct usb2_com_softc *, struct termios *); -static void uvscom_cfg_param(struct usb2_com_softc *, struct termios *); -static int uvscom_pre_open(struct usb2_com_softc *); -static void uvscom_cfg_open(struct usb2_com_softc *); -static void uvscom_cfg_close(struct usb2_com_softc *); -static void uvscom_start_read(struct usb2_com_softc *); -static void uvscom_stop_read(struct usb2_com_softc *); -static void uvscom_start_write(struct usb2_com_softc *); -static void uvscom_stop_write(struct usb2_com_softc *); -static void uvscom_cfg_get_status(struct usb2_com_softc *, uint8_t *, +static void uvscom_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void uvscom_cfg_set_rts(struct ucom_softc *, uint8_t); +static void uvscom_cfg_set_break(struct ucom_softc *, uint8_t); +static int uvscom_pre_param(struct ucom_softc *, struct termios *); +static void uvscom_cfg_param(struct ucom_softc *, struct termios *); +static int uvscom_pre_open(struct ucom_softc *); +static void uvscom_cfg_open(struct ucom_softc *); +static void uvscom_cfg_close(struct ucom_softc *); +static void uvscom_start_read(struct ucom_softc *); +static void uvscom_stop_read(struct ucom_softc *); +static void uvscom_start_write(struct ucom_softc *); +static void uvscom_stop_write(struct ucom_softc *); +static void uvscom_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); static void uvscom_cfg_write(struct uvscom_softc *, uint8_t, uint16_t); static uint16_t uvscom_cfg_read_status(struct uvscom_softc *); -static const struct usb2_config uvscom_config[UVSCOM_N_TRANSFER] = { +static const struct usb_config uvscom_config[UVSCOM_N_TRANSFER] = { [UVSCOM_BULK_DT_WR] = { .type = UE_BULK, @@ -203,7 +203,7 @@ static const struct usb2_config uvscom_config[UVSCOM_N_TRANSFER] = { }, }; -static const struct usb2_com_callback uvscom_callback = { +static const struct ucom_callback uvscom_callback = { .usb2_com_cfg_get_status = &uvscom_cfg_get_status, .usb2_com_cfg_set_dtr = &uvscom_cfg_set_dtr, .usb2_com_cfg_set_rts = &uvscom_cfg_set_rts, @@ -219,7 +219,7 @@ static const struct usb2_com_callback uvscom_callback = { .usb2_com_stop_write = &uvscom_stop_write, }; -static const struct usb2_device_id uvscom_devs[] = { +static const struct usb_device_id uvscom_devs[] = { /* SUNTAC U-Cable type A4 */ {USB_VPI(USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS144L4, 0)}, /* SUNTAC U-Cable type D2 */ @@ -255,7 +255,7 @@ MODULE_VERSION(uvscom, UVSCOM_MODVER); static int uvscom_probe(device_t dev) { - struct usb2_attach_arg *uaa = device_get_ivars(dev); + struct usb_attach_arg *uaa = device_get_ivars(dev); if (uaa->usb_mode != USB_MODE_HOST) { return (ENXIO); @@ -272,7 +272,7 @@ uvscom_probe(device_t dev) static int uvscom_attach(device_t dev) { - struct usb2_attach_arg *uaa = device_get_ivars(dev); + struct usb_attach_arg *uaa = device_get_ivars(dev); struct uvscom_softc *sc = device_get_softc(dev); int error; @@ -338,7 +338,7 @@ uvscom_detach(device_t dev) } static void -uvscom_write_callback(struct usb2_xfer *xfer) +uvscom_write_callback(struct usb_xfer *xfer) { struct uvscom_softc *sc = xfer->priv_sc; uint32_t actlen; @@ -366,7 +366,7 @@ tr_setup: } static void -uvscom_read_callback(struct usb2_xfer *xfer) +uvscom_read_callback(struct usb_xfer *xfer) { struct uvscom_softc *sc = xfer->priv_sc; @@ -391,7 +391,7 @@ tr_setup: } static void -uvscom_intr_callback(struct usb2_xfer *xfer) +uvscom_intr_callback(struct usb_xfer *xfer) { struct uvscom_softc *sc = xfer->priv_sc; uint8_t buf[2]; @@ -444,7 +444,7 @@ tr_setup: } static void -uvscom_cfg_set_dtr(struct usb2_com_softc *ucom, uint8_t onoff) +uvscom_cfg_set_dtr(struct ucom_softc *ucom, uint8_t onoff) { struct uvscom_softc *sc = ucom->sc_parent; @@ -459,7 +459,7 @@ uvscom_cfg_set_dtr(struct usb2_com_softc *ucom, uint8_t onoff) } static void -uvscom_cfg_set_rts(struct usb2_com_softc *ucom, uint8_t onoff) +uvscom_cfg_set_rts(struct ucom_softc *ucom, uint8_t onoff) { struct uvscom_softc *sc = ucom->sc_parent; @@ -474,7 +474,7 @@ uvscom_cfg_set_rts(struct usb2_com_softc *ucom, uint8_t onoff) } static void -uvscom_cfg_set_break(struct usb2_com_softc *ucom, uint8_t onoff) +uvscom_cfg_set_break(struct ucom_softc *ucom, uint8_t onoff) { struct uvscom_softc *sc = ucom->sc_parent; @@ -489,7 +489,7 @@ uvscom_cfg_set_break(struct usb2_com_softc *ucom, uint8_t onoff) } static int -uvscom_pre_param(struct usb2_com_softc *ucom, struct termios *t) +uvscom_pre_param(struct ucom_softc *ucom, struct termios *t) { switch (t->c_ospeed) { case B150: @@ -510,7 +510,7 @@ uvscom_pre_param(struct usb2_com_softc *ucom, struct termios *t) } static void -uvscom_cfg_param(struct usb2_com_softc *ucom, struct termios *t) +uvscom_cfg_param(struct ucom_softc *ucom, struct termios *t) { struct uvscom_softc *sc = ucom->sc_parent; uint16_t value; @@ -592,7 +592,7 @@ uvscom_cfg_param(struct usb2_com_softc *ucom, struct termios *t) } static int -uvscom_pre_open(struct usb2_com_softc *ucom) +uvscom_pre_open(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -608,7 +608,7 @@ uvscom_pre_open(struct usb2_com_softc *ucom) } static void -uvscom_cfg_open(struct usb2_com_softc *ucom) +uvscom_cfg_open(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -618,7 +618,7 @@ uvscom_cfg_open(struct usb2_com_softc *ucom) } static void -uvscom_cfg_close(struct usb2_com_softc *ucom) +uvscom_cfg_close(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -628,7 +628,7 @@ uvscom_cfg_close(struct usb2_com_softc *ucom) } static void -uvscom_start_read(struct usb2_com_softc *ucom) +uvscom_start_read(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -636,7 +636,7 @@ uvscom_start_read(struct usb2_com_softc *ucom) } static void -uvscom_stop_read(struct usb2_com_softc *ucom) +uvscom_stop_read(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -644,7 +644,7 @@ uvscom_stop_read(struct usb2_com_softc *ucom) } static void -uvscom_start_write(struct usb2_com_softc *ucom) +uvscom_start_write(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -652,7 +652,7 @@ uvscom_start_write(struct usb2_com_softc *ucom) } static void -uvscom_stop_write(struct usb2_com_softc *ucom) +uvscom_stop_write(struct ucom_softc *ucom) { struct uvscom_softc *sc = ucom->sc_parent; @@ -660,7 +660,7 @@ uvscom_stop_write(struct usb2_com_softc *ucom) } static void -uvscom_cfg_get_status(struct usb2_com_softc *ucom, uint8_t *lsr, uint8_t *msr) +uvscom_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) { struct uvscom_softc *sc = ucom->sc_parent; @@ -671,7 +671,7 @@ uvscom_cfg_get_status(struct usb2_com_softc *ucom, uint8_t *lsr, uint8_t *msr) static void uvscom_cfg_write(struct uvscom_softc *sc, uint8_t index, uint16_t value) { - struct usb2_device_request req; + struct usb_device_request req; usb2_error_t err; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; @@ -691,7 +691,7 @@ uvscom_cfg_write(struct uvscom_softc *sc, uint8_t index, uint16_t value) static uint16_t uvscom_cfg_read_status(struct uvscom_softc *sc) { - struct usb2_device_request req; + struct usb_device_request req; usb2_error_t err; uint8_t data[2]; |