From owner-p4-projects@FreeBSD.ORG Tue Oct 10 13:32:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7CDE416A47C; Tue, 10 Oct 2006 13:32:55 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BB6316A40F for ; Tue, 10 Oct 2006 13:32:55 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1736E43D77 for ; Tue, 10 Oct 2006 13:32:47 +0000 (GMT) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k9ADWlE8081210 for ; Tue, 10 Oct 2006 13:32:47 GMT (envelope-from attilio@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k9ADWlhm081205 for perforce@freebsd.org; Tue, 10 Oct 2006 13:32:47 GMT (envelope-from attilio@FreeBSD.org) Date: Tue, 10 Oct 2006 13:32:47 GMT Message-Id: <200610101332.k9ADWlhm081205@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to attilio@FreeBSD.org using -f From: Attilio Rao To: Perforce Change Reviews Cc: Subject: PERFORCE change 107616 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2006 13:32:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=107616 Change 107616 by attilio@attilio_laptop on 2006/10/10 13:31:58 Stylize it. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ucomvar.h#8 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ucomvar.h#8 (text+ko) ==== @@ -65,79 +65,68 @@ */ /* Module interface related macros */ -#define UCOM_MODVER 1 +#define UCOM_MODVER 1 -#define UCOM_MINVER 1 -#define UCOM_PREFVER UCOM_MODVER -#define UCOM_MAXVER 1 +#define UCOM_MINVER 1 +#define UCOM_PREFVER UCOM_MODVER +#define UCOM_MAXVER 1 struct ucom_softc; struct thread; struct ucom_callback { - void (*ucom_get_status)(struct ucom_softc *, u_int8_t *, u_int8_t *); - void (*ucom_set_dtr)(struct ucom_softc *, u_int8_t); - void (*ucom_set_rts)(struct ucom_softc *, u_int8_t); - void (*ucom_set_break)(struct ucom_softc *, u_int8_t); - int (*ucom_param)(struct ucom_softc *, struct termios *); - int (*ucom_ioctl)(struct ucom_softc *, u_long, caddr_t, int, struct thread *); - int (*ucom_open)(struct ucom_softc *); - void (*ucom_close)(struct ucom_softc *); - void (*ucom_start_read)(struct ucom_softc *); - void (*ucom_stop_read)(struct ucom_softc *); - void (*ucom_start_write)(struct ucom_softc *); - void (*ucom_stop_write)(struct ucom_softc *); + void (*ucom_get_status)(struct ucom_softc *, uint8_t *, uint8_t *); + void (*ucom_set_dtr)(struct ucom_softc *, uint8_t); + void (*ucom_set_rts)(struct ucom_softc *, uint8_t); + void (*ucom_set_break)(struct ucom_softc *, uint8_t); + int (*ucom_param)(struct ucom_softc *, struct termios *); + int (*ucom_ioctl)(struct ucom_softc *, ulong, caddr_t, int, + struct thread *); + int (*ucom_open)(struct ucom_softc *); + void (*ucom_close)(struct ucom_softc *); + void (*ucom_start_read)(struct ucom_softc *); + void (*ucom_stop_read)(struct ucom_softc *); + void (*ucom_start_write)(struct ucom_softc *); + void (*ucom_stop_write)(struct ucom_softc *); }; -/* line status register */ -#define ULSR_RCV_FIFO 0x80 -#define ULSR_TSRE 0x40 /* Transmitter empty: byte sent */ -#define ULSR_TXRDY 0x20 /* Transmitter buffer empty */ -#define ULSR_BI 0x10 /* Break detected */ -#define ULSR_FE 0x08 /* Framing error: bad stop bit */ -#define ULSR_PE 0x04 /* Parity error */ -#define ULSR_OE 0x02 /* Overrun, lost incoming byte */ -#define ULSR_RXRDY 0x01 /* Byte ready in Receive Buffer */ -#define ULSR_RCV_MASK 0x1f /* Mask for incoming data or error */ +/* Line status register */ +#define ULSR_RCV_FIFO 0x80 +#define ULSR_TSRE 0x40 /* Transmitter empty: byte sent */ +#define ULSR_TXRDY 0x20 /* Transmitter buffer empty */ +#define ULSR_BI 0x10 /* Break detected */ +#define ULSR_FE 0x08 /* Framing error: bad stop bit */ +#define ULSR_PE 0x04 /* Parity error */ +#define ULSR_OE 0x02 /* Overrun, lost incoming byte */ +#define ULSR_RXRDY 0x01 /* Byte ready in Receive Buffer */ +#define ULSR_RCV_MASK 0x1f /* Mask for incoming data or error */ struct ucom_softc { - struct task sc_task; - - const struct ucom_callback *sc_callback; - struct tty *sc_tty; - struct mtx *sc_parent_mtx; - void *sc_parent; - - uint32_t sc_unit; - - u_int16_t sc_portno; - - u_int8_t sc_flag; -#define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */ -#define UCOM_FLAG_GONE 0x02 /* the device is gone */ -#define UCOM_FLAG_ATTACHED 0x04 /* set if attached */ -#define UCOM_FLAG_READ_ON 0x08 /* set if read is enabled */ -#define UCOM_FLAG_WRITE_ON 0x10 /* set if write is enabled */ - - u_int8_t sc_lsr; - u_int8_t sc_msr; - u_int8_t sc_mcr; - u_int8_t sc_poll; - u_int8_t sc_last_status; + struct task sc_task; + const struct ucom_callback *sc_callback; + struct tty *sc_tty; + struct mtx *sc_parent_mtx; + void *sc_parent; + uint32_t sc_unit; + uint16_t sc_portno; + uint8_t sc_flag; +#define UCOM_FLAG_RTS_IFLOW 0x01 /* use RTS input flow control */ +#define UCOM_FLAG_GONE 0x02 /* the device is gone */ +#define UCOM_FLAG_ATTACHED 0x04 /* set if attached */ +#define UCOM_FLAG_READ_ON 0x08 /* set if read is enabled */ +#define UCOM_FLAG_WRITE_ON 0x10 /* set if write is enabled */ + uint8_t sc_lsr; + uint8_t sc_msr; + uint8_t sc_mcr; + uint8_t sc_poll; + uint8_t sc_last_status; }; -extern int -ucom_attach(struct ucom_softc *sc, uint32_t sub_units, void *parent, +int ucom_attach(struct ucom_softc *sc, uint32_t sub_units, void *parent, const struct ucom_callback *callback, struct mtx *p_mtx); -extern void -ucom_detach(struct ucom_softc *sc, uint32_t sub_units); - -extern void -ucom_status_change(struct ucom_softc *); - -extern u_int8_t -ucom_get_data(struct ucom_softc *sc, u_int8_t *buf, u_int32_t len, - u_int32_t *actlen); -extern void -ucom_put_data(struct ucom_softc *sc, u_int8_t *ptr, u_int16_t len); +void ucom_detach(struct ucom_softc *sc, uint32_t sub_units); +void ucom_status_change(struct ucom_softc *); +uint8_t ucom_get_data(struct ucom_softc *sc, uint8_t *buf, uint32_t len, + uint32_t *actlen); +void ucom_put_data(struct ucom_softc *sc, uint8_t *ptr, uint16_t len);