uplcom.c (196219) | uplcom.c (197570) |
---|---|
1/* $NetBSD: uplcom.c,v 1.21 2001/11/13 06:24:56 lukem Exp $ */ 2 3#include <sys/cdefs.h> | 1/* $NetBSD: uplcom.c,v 1.21 2001/11/13 06:24:56 lukem Exp $ */ 2 3#include <sys/cdefs.h> |
4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uplcom.c 196219 2009-08-14 20:03:53Z jhb $"); | 4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/uplcom.c 197570 2009-09-28 08:13:50Z thompsa $"); |
5 6/*- 7 * Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: --- 168 unchanged lines hidden (view full) --- 181static int uplcom_pre_param(struct ucom_softc *, struct termios *); 182static void uplcom_cfg_param(struct ucom_softc *, struct termios *); 183static void uplcom_start_read(struct ucom_softc *); 184static void uplcom_stop_read(struct ucom_softc *); 185static void uplcom_start_write(struct ucom_softc *); 186static void uplcom_stop_write(struct ucom_softc *); 187static void uplcom_cfg_get_status(struct ucom_softc *, uint8_t *, 188 uint8_t *); | 5 6/*- 7 * Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: --- 168 unchanged lines hidden (view full) --- 181static int uplcom_pre_param(struct ucom_softc *, struct termios *); 182static void uplcom_cfg_param(struct ucom_softc *, struct termios *); 183static void uplcom_start_read(struct ucom_softc *); 184static void uplcom_stop_read(struct ucom_softc *); 185static void uplcom_start_write(struct ucom_softc *); 186static void uplcom_stop_write(struct ucom_softc *); 187static void uplcom_cfg_get_status(struct ucom_softc *, uint8_t *, 188 uint8_t *); |
189static void uplcom_poll(struct ucom_softc *ucom); |
|
189 190static device_probe_t uplcom_probe; 191static device_attach_t uplcom_attach; 192static device_detach_t uplcom_detach; 193 194static usb_callback_t uplcom_intr_callback; 195static usb_callback_t uplcom_write_callback; 196static usb_callback_t uplcom_read_callback; --- 37 unchanged lines hidden (view full) --- 234 .ucom_cfg_set_rts = &uplcom_cfg_set_rts, 235 .ucom_cfg_set_break = &uplcom_cfg_set_break, 236 .ucom_cfg_param = &uplcom_cfg_param, 237 .ucom_pre_param = &uplcom_pre_param, 238 .ucom_start_read = &uplcom_start_read, 239 .ucom_stop_read = &uplcom_stop_read, 240 .ucom_start_write = &uplcom_start_write, 241 .ucom_stop_write = &uplcom_stop_write, | 190 191static device_probe_t uplcom_probe; 192static device_attach_t uplcom_attach; 193static device_detach_t uplcom_detach; 194 195static usb_callback_t uplcom_intr_callback; 196static usb_callback_t uplcom_write_callback; 197static usb_callback_t uplcom_read_callback; --- 37 unchanged lines hidden (view full) --- 235 .ucom_cfg_set_rts = &uplcom_cfg_set_rts, 236 .ucom_cfg_set_break = &uplcom_cfg_set_break, 237 .ucom_cfg_param = &uplcom_cfg_param, 238 .ucom_pre_param = &uplcom_pre_param, 239 .ucom_start_read = &uplcom_start_read, 240 .ucom_stop_read = &uplcom_stop_read, 241 .ucom_start_write = &uplcom_start_write, 242 .ucom_stop_write = &uplcom_stop_write, |
243 .ucom_poll = &uplcom_poll, |
|
242}; 243 244#define USB_UPL(v,p,rl,rh,t) \ 245 USB_VENDOR(v), USB_PRODUCT(p), USB_DEV_BCD_GTEQ(rl), \ 246 USB_DEV_BCD_LTEQ(rh), USB_DRIVER_INFO(t) 247 248static const struct usb_device_id uplcom_devs[] = { 249 /* Belkin F5U257 */ --- 607 unchanged lines hidden (view full) --- 857 if (error != USB_ERR_CANCELLED) { 858 /* try to clear stall first */ 859 usbd_xfer_set_stall(xfer); 860 goto tr_setup; 861 } 862 return; 863 } 864} | 244}; 245 246#define USB_UPL(v,p,rl,rh,t) \ 247 USB_VENDOR(v), USB_PRODUCT(p), USB_DEV_BCD_GTEQ(rl), \ 248 USB_DEV_BCD_LTEQ(rh), USB_DRIVER_INFO(t) 249 250static const struct usb_device_id uplcom_devs[] = { 251 /* Belkin F5U257 */ --- 607 unchanged lines hidden (view full) --- 859 if (error != USB_ERR_CANCELLED) { 860 /* try to clear stall first */ 861 usbd_xfer_set_stall(xfer); 862 goto tr_setup; 863 } 864 return; 865 } 866} |
867 868static void 869uplcom_poll(struct ucom_softc *ucom) 870{ 871 struct uplcom_softc *sc = ucom->sc_parent; 872 usbd_transfer_poll(sc->sc_xfer, UPLCOM_N_TRANSFER); 873} |
|