digi.c (159804) | digi.c (162711) |
---|---|
1/*- 2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Slawa Olhovchenkov 4 * John Prince <johnp@knight-trosoft.com> 5 * Eric Hernes 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Slawa Olhovchenkov 4 * John Prince <johnp@knight-trosoft.com> 5 * Eric Hernes 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/digi/digi.c 159804 2006-06-20 20:54:13Z jhb $ | 29 * $FreeBSD: head/sys/dev/digi/digi.c 162711 2006-09-27 19:57:02Z ru $ |
30 */ 31 32/*- 33 * TODO: 34 * Figure out what the con bios stuff is supposed to do 35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem. 36 */ 37 --- 870 unchanged lines hidden (view full) --- 908 } 909} 910 911static int 912digiioctl(struct tty *tp, u_long cmd, void *data, int flag, struct thread *td) 913{ 914 struct digi_softc *sc; 915 struct digi_p *port; | 30 */ 31 32/*- 33 * TODO: 34 * Figure out what the con bios stuff is supposed to do 35 * Test with *LOTS* more cards - I only have a PCI8r and an ISA Xem. 36 */ 37 --- 870 unchanged lines hidden (view full) --- 908 } 909} 910 911static int 912digiioctl(struct tty *tp, u_long cmd, void *data, int flag, struct thread *td) 913{ 914 struct digi_softc *sc; 915 struct digi_p *port; |
916#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ 917 defined(COMPAT_FREEBSD4) || defined(COMPAT_43) 918 int ival; 919#endif |
|
916 917 port = tp->t_sc; 918 sc = port->sc; 919 if (sc->status == DIGI_STATUS_DISABLED) 920 return (ENXIO); 921 922 if (!(port->status & ENABLED)) 923 return (ENXIO); --- 13 unchanged lines hidden (view full) --- 937 } else { 938 DLOG(DIGIDB_SET, (sc->dev, 939 "port%d: ALTPIN cleared\n", port->pnum)); 940 port->cd = sc->csigs->cd; 941 port->dsr = sc->csigs->dsr; 942 } 943 } 944 return (0); | 920 921 port = tp->t_sc; 922 sc = port->sc; 923 if (sc->status == DIGI_STATUS_DISABLED) 924 return (ENXIO); 925 926 if (!(port->status & ENABLED)) 927 return (ENXIO); --- 13 unchanged lines hidden (view full) --- 941 } else { 942 DLOG(DIGIDB_SET, (sc->dev, 943 "port%d: ALTPIN cleared\n", port->pnum)); 944 port->cd = sc->csigs->cd; 945 port->dsr = sc->csigs->dsr; 946 } 947 } 948 return (0); |
949#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ 950 defined(COMPAT_FREEBSD4) || defined(COMPAT_43) 951 case _IO('e', 'C'): 952 ival = IOCPARM_IVAL(data); 953 data = &ival; 954 /* FALLTHROUGH */ 955#endif |
|
945 case DIGIIO_RING: | 956 case DIGIIO_RING: |
946 port->send_ring = *(u_char *)data; | 957 port->send_ring = (u_char)*(int *)data; |
947 break; 948 default: 949 return (ENOTTY); 950 } 951 return (0); 952} 953 954static void --- 595 unchanged lines hidden --- | 958 break; 959 default: 960 return (ENOTTY); 961 } 962 return (0); 963} 964 965static void --- 595 unchanged lines hidden --- |