Deleted Added
full compact
uipaq.c (196493) uipaq.c (197570)
1/* $NetBSD: uipaq.c,v 1.4 2006/11/16 01:33:27 christos Exp $ */
2/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
3
4/*
5 * Copyright (c) 2000-2005 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation

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

44 * 19 July 2003: Incorporated changes suggested by Sam Lawrance from
45 * the uppc module
46 *
47 *
48 * Contact isis@cs.umd.edu if you have any questions/comments about this driver
49 */
50
51#include <sys/cdefs.h>
1/* $NetBSD: uipaq.c,v 1.4 2006/11/16 01:33:27 christos Exp $ */
2/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
3
4/*
5 * Copyright (c) 2000-2005 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation

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

44 * 19 July 2003: Incorporated changes suggested by Sam Lawrance from
45 * the uppc module
46 *
47 *
48 * Contact isis@cs.umd.edu if you have any questions/comments about this driver
49 */
50
51#include <sys/cdefs.h>
52__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uipaq.c 196493 2009-08-24 05:01:06Z alfred $");
52__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uipaq.c 197570 2009-09-28 08:13:50Z thompsa $");
53
54#include <sys/stdint.h>
55#include <sys/stddef.h>
56#include <sys/param.h>
57#include <sys/queue.h>
58#include <sys/types.h>
59#include <sys/systm.h>
60#include <sys/kernel.h>

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

117
118static void uipaq_start_read(struct ucom_softc *);
119static void uipaq_stop_read(struct ucom_softc *);
120static void uipaq_start_write(struct ucom_softc *);
121static void uipaq_stop_write(struct ucom_softc *);
122static void uipaq_cfg_set_dtr(struct ucom_softc *, uint8_t);
123static void uipaq_cfg_set_rts(struct ucom_softc *, uint8_t);
124static void uipaq_cfg_set_break(struct ucom_softc *, uint8_t);
53
54#include <sys/stdint.h>
55#include <sys/stddef.h>
56#include <sys/param.h>
57#include <sys/queue.h>
58#include <sys/types.h>
59#include <sys/systm.h>
60#include <sys/kernel.h>

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

117
118static void uipaq_start_read(struct ucom_softc *);
119static void uipaq_stop_read(struct ucom_softc *);
120static void uipaq_start_write(struct ucom_softc *);
121static void uipaq_stop_write(struct ucom_softc *);
122static void uipaq_cfg_set_dtr(struct ucom_softc *, uint8_t);
123static void uipaq_cfg_set_rts(struct ucom_softc *, uint8_t);
124static void uipaq_cfg_set_break(struct ucom_softc *, uint8_t);
125static void uipaq_poll(struct ucom_softc *ucom);
125
126static const struct usb_config uipaq_config_data[UIPAQ_N_TRANSFER] = {
127
128 [UIPAQ_BULK_DT_WR] = {
129 .type = UE_BULK,
130 .endpoint = UE_ADDR_ANY,
131 .direction = UE_DIR_OUT,
132 .bufsize = UIPAQ_BUF_SIZE,

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

147static const struct ucom_callback uipaq_callback = {
148 .ucom_cfg_set_dtr = &uipaq_cfg_set_dtr,
149 .ucom_cfg_set_rts = &uipaq_cfg_set_rts,
150 .ucom_cfg_set_break = &uipaq_cfg_set_break,
151 .ucom_start_read = &uipaq_start_read,
152 .ucom_stop_read = &uipaq_stop_read,
153 .ucom_start_write = &uipaq_start_write,
154 .ucom_stop_write = &uipaq_stop_write,
126
127static const struct usb_config uipaq_config_data[UIPAQ_N_TRANSFER] = {
128
129 [UIPAQ_BULK_DT_WR] = {
130 .type = UE_BULK,
131 .endpoint = UE_ADDR_ANY,
132 .direction = UE_DIR_OUT,
133 .bufsize = UIPAQ_BUF_SIZE,

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

148static const struct ucom_callback uipaq_callback = {
149 .ucom_cfg_set_dtr = &uipaq_cfg_set_dtr,
150 .ucom_cfg_set_rts = &uipaq_cfg_set_rts,
151 .ucom_cfg_set_break = &uipaq_cfg_set_break,
152 .ucom_start_read = &uipaq_start_read,
153 .ucom_stop_read = &uipaq_stop_read,
154 .ucom_start_write = &uipaq_start_write,
155 .ucom_stop_write = &uipaq_stop_write,
156 .ucom_poll = &uipaq_poll,
155};
156
157/*
158 * Much of this list is generated from lists of other drivers that
159 * support the same hardware. Numeric values are used where no usbdevs
160 * entries exist.
161 */
162static const struct usb_device_id uipaq_devs[] = {

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

1337 if (error != USB_ERR_CANCELLED) {
1338 /* try to clear stall first */
1339 usbd_xfer_set_stall(xfer);
1340 goto tr_setup;
1341 }
1342 return;
1343 }
1344}
157};
158
159/*
160 * Much of this list is generated from lists of other drivers that
161 * support the same hardware. Numeric values are used where no usbdevs
162 * entries exist.
163 */
164static const struct usb_device_id uipaq_devs[] = {

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

1339 if (error != USB_ERR_CANCELLED) {
1340 /* try to clear stall first */
1341 usbd_xfer_set_stall(xfer);
1342 goto tr_setup;
1343 }
1344 return;
1345 }
1346}
1347
1348static void
1349uipaq_poll(struct ucom_softc *ucom)
1350{
1351 struct uipaq_softc *sc = ucom->sc_parent;
1352 usbd_transfer_poll(sc->sc_xfer, UIPAQ_N_TRANSFER);
1353}