Deleted Added
full compact
umct.c (196219) umct.c (197570)
1#include <sys/cdefs.h>
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD: head/sys/dev/usb/serial/umct.c 196219 2009-08-14 20:03:53Z jhb $");
2__FBSDID("$FreeBSD: head/sys/dev/usb/serial/umct.c 197570 2009-09-28 08:13:50Z thompsa $");
3
4/*-
5 * Copyright (c) 2003 Scott Long
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 126 unchanged lines hidden (view full) ---

137static void umct_cfg_set_rts(struct ucom_softc *, uint8_t);
138static uint8_t umct_calc_baud(uint32_t);
139static int umct_pre_param(struct ucom_softc *, struct termios *);
140static void umct_cfg_param(struct ucom_softc *, struct termios *);
141static void umct_start_read(struct ucom_softc *);
142static void umct_stop_read(struct ucom_softc *);
143static void umct_start_write(struct ucom_softc *);
144static void umct_stop_write(struct ucom_softc *);
3
4/*-
5 * Copyright (c) 2003 Scott Long
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:

--- 126 unchanged lines hidden (view full) ---

137static void umct_cfg_set_rts(struct ucom_softc *, uint8_t);
138static uint8_t umct_calc_baud(uint32_t);
139static int umct_pre_param(struct ucom_softc *, struct termios *);
140static void umct_cfg_param(struct ucom_softc *, struct termios *);
141static void umct_start_read(struct ucom_softc *);
142static void umct_stop_read(struct ucom_softc *);
143static void umct_start_write(struct ucom_softc *);
144static void umct_stop_write(struct ucom_softc *);
145static void umct_poll(struct ucom_softc *ucom);
145
146static const struct usb_config umct_config[UMCT_N_TRANSFER] = {
147
148 [UMCT_BULK_DT_WR] = {
149 .type = UE_BULK,
150 .endpoint = UE_ADDR_ANY,
151 .direction = UE_DIR_OUT,
152 .bufsize = 0, /* use wMaxPacketSize */

--- 28 unchanged lines hidden (view full) ---

181 .ucom_cfg_set_rts = &umct_cfg_set_rts,
182 .ucom_cfg_set_break = &umct_cfg_set_break,
183 .ucom_cfg_param = &umct_cfg_param,
184 .ucom_pre_param = &umct_pre_param,
185 .ucom_start_read = &umct_start_read,
186 .ucom_stop_read = &umct_stop_read,
187 .ucom_start_write = &umct_start_write,
188 .ucom_stop_write = &umct_stop_write,
146
147static const struct usb_config umct_config[UMCT_N_TRANSFER] = {
148
149 [UMCT_BULK_DT_WR] = {
150 .type = UE_BULK,
151 .endpoint = UE_ADDR_ANY,
152 .direction = UE_DIR_OUT,
153 .bufsize = 0, /* use wMaxPacketSize */

--- 28 unchanged lines hidden (view full) ---

182 .ucom_cfg_set_rts = &umct_cfg_set_rts,
183 .ucom_cfg_set_break = &umct_cfg_set_break,
184 .ucom_cfg_param = &umct_cfg_param,
185 .ucom_pre_param = &umct_pre_param,
186 .ucom_start_read = &umct_start_read,
187 .ucom_stop_read = &umct_stop_read,
188 .ucom_start_write = &umct_start_write,
189 .ucom_stop_write = &umct_stop_write,
190 .ucom_poll = &umct_poll,
189};
190
191static const struct usb_device_id umct_devs[] = {
192 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232, 0)},
193 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_SITECOM_USB232, 0)},
194 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_DU_H3SP_USB232, 0)},
195 {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U109, 0)},
196 {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U409, 0)},

--- 401 unchanged lines hidden (view full) ---

598 if (error != USB_ERR_CANCELLED) {
599 /* try to clear stall first */
600 usbd_xfer_set_stall(xfer);
601 goto tr_setup;
602 }
603 return;
604 }
605}
191};
192
193static const struct usb_device_id umct_devs[] = {
194 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232, 0)},
195 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_SITECOM_USB232, 0)},
196 {USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_DU_H3SP_USB232, 0)},
197 {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U109, 0)},
198 {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U409, 0)},

--- 401 unchanged lines hidden (view full) ---

600 if (error != USB_ERR_CANCELLED) {
601 /* try to clear stall first */
602 usbd_xfer_set_stall(xfer);
603 goto tr_setup;
604 }
605 return;
606 }
607}
608
609static void
610umct_poll(struct ucom_softc *ucom)
611{
612 struct umct_softc *sc = ucom->sc_parent;
613 usbd_transfer_poll(sc->sc_xfer, UMCT_N_TRANSFER);
614}