umodem.c (196219) | umodem.c (197570) |
---|---|
1/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ 2 3#include <sys/cdefs.h> | 1/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ 2 3#include <sys/cdefs.h> |
4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/umodem.c 196219 2009-08-14 20:03:53Z jhb $"); | 4__FBSDID("$FreeBSD: head/sys/dev/usb/serial/umodem.c 197570 2009-09-28 08:13:50Z thompsa $"); |
5 6/*- 7 * Copyright (c) 2003, M. Warner Losh <imp@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: --- 178 unchanged lines hidden (view full) --- 191static int umodem_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, 192 struct thread *); 193static void umodem_cfg_set_dtr(struct ucom_softc *, uint8_t); 194static void umodem_cfg_set_rts(struct ucom_softc *, uint8_t); 195static void umodem_cfg_set_break(struct ucom_softc *, uint8_t); 196static void *umodem_get_desc(struct usb_attach_arg *, uint8_t, uint8_t); 197static usb_error_t umodem_set_comm_feature(struct usb_device *, uint8_t, 198 uint16_t, uint16_t); | 5 6/*- 7 * Copyright (c) 2003, M. Warner Losh <imp@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: --- 178 unchanged lines hidden (view full) --- 191static int umodem_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, 192 struct thread *); 193static void umodem_cfg_set_dtr(struct ucom_softc *, uint8_t); 194static void umodem_cfg_set_rts(struct ucom_softc *, uint8_t); 195static void umodem_cfg_set_break(struct ucom_softc *, uint8_t); 196static void *umodem_get_desc(struct usb_attach_arg *, uint8_t, uint8_t); 197static usb_error_t umodem_set_comm_feature(struct usb_device *, uint8_t, 198 uint16_t, uint16_t); |
199static void umodem_poll(struct ucom_softc *ucom); |
|
199 200static const struct usb_config umodem_config[UMODEM_N_TRANSFER] = { 201 202 [UMODEM_BULK_WR] = { 203 .type = UE_BULK, 204 .endpoint = UE_ADDR_ANY, 205 .direction = UE_DIR_OUT, 206 .if_index = 0, --- 30 unchanged lines hidden (view full) --- 237 .ucom_cfg_set_break = &umodem_cfg_set_break, 238 .ucom_cfg_param = &umodem_cfg_param, 239 .ucom_pre_param = &umodem_pre_param, 240 .ucom_ioctl = &umodem_ioctl, 241 .ucom_start_read = &umodem_start_read, 242 .ucom_stop_read = &umodem_stop_read, 243 .ucom_start_write = &umodem_start_write, 244 .ucom_stop_write = &umodem_stop_write, | 200 201static const struct usb_config umodem_config[UMODEM_N_TRANSFER] = { 202 203 [UMODEM_BULK_WR] = { 204 .type = UE_BULK, 205 .endpoint = UE_ADDR_ANY, 206 .direction = UE_DIR_OUT, 207 .if_index = 0, --- 30 unchanged lines hidden (view full) --- 238 .ucom_cfg_set_break = &umodem_cfg_set_break, 239 .ucom_cfg_param = &umodem_cfg_param, 240 .ucom_pre_param = &umodem_pre_param, 241 .ucom_ioctl = &umodem_ioctl, 242 .ucom_start_read = &umodem_start_read, 243 .ucom_stop_read = &umodem_stop_read, 244 .ucom_start_write = &umodem_start_write, 245 .ucom_stop_write = &umodem_stop_write, |
246 .ucom_poll = &umodem_poll, |
|
245}; 246 247static device_method_t umodem_methods[] = { 248 DEVMETHOD(device_probe, umodem_probe), 249 DEVMETHOD(device_attach, umodem_attach), 250 DEVMETHOD(device_detach, umodem_detach), 251 {0, 0} 252}; --- 552 unchanged lines hidden (view full) --- 805 DPRINTF("sc=%p\n", sc); 806 807 ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); 808 usbd_transfer_unsetup(sc->sc_xfer, UMODEM_N_TRANSFER); 809 mtx_destroy(&sc->sc_mtx); 810 811 return (0); 812} | 247}; 248 249static device_method_t umodem_methods[] = { 250 DEVMETHOD(device_probe, umodem_probe), 251 DEVMETHOD(device_attach, umodem_attach), 252 DEVMETHOD(device_detach, umodem_detach), 253 {0, 0} 254}; --- 552 unchanged lines hidden (view full) --- 807 DPRINTF("sc=%p\n", sc); 808 809 ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1); 810 usbd_transfer_unsetup(sc->sc_xfer, UMODEM_N_TRANSFER); 811 mtx_destroy(&sc->sc_mtx); 812 813 return (0); 814} |
815 816static void 817umodem_poll(struct ucom_softc *ucom) 818{ 819 struct umodem_softc *sc = ucom->sc_parent; 820 usbd_transfer_poll(sc->sc_xfer, UMODEM_N_TRANSFER); 821} |
|