Deleted Added
full compact
if_plip.c (111119) if_plip.c (111888)
1/*-
2 * Copyright (c) 1997 Poul-Henning Kamp
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
1/*-
2 * Copyright (c) 1997 Poul-Henning Kamp
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
27 * $FreeBSD: head/sys/dev/ppbus/if_plip.c 111119 2003-02-19 05:47:46Z imp $
27 * $FreeBSD: head/sys/dev/ppbus/if_plip.c 111888 2003-03-04 23:19:55Z jlemon $
28 */
29
30/*
31 * Parallel port TCP/IP interfaces added. I looked at the driver from
32 * MACH but this is a complete rewrite, and btw. incompatible, and it
33 * should perform better too. I have never run the MACH driver though.
34 *
35 * This driver sends two bytes (0x08, 0x00) in front of each packet,

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

515
516 len -= CLPIPHDRLEN;
517 sc->sc_if.if_ipackets++;
518 sc->sc_if.if_ibytes += len;
519 top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, &sc->sc_if, 0);
520 if (top) {
521 if (sc->sc_if.if_bpf)
522 lptap(&sc->sc_if, top);
28 */
29
30/*
31 * Parallel port TCP/IP interfaces added. I looked at the driver from
32 * MACH but this is a complete rewrite, and btw. incompatible, and it
33 * should perform better too. I have never run the MACH driver though.
34 *
35 * This driver sends two bytes (0x08, 0x00) in front of each packet,

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

515
516 len -= CLPIPHDRLEN;
517 sc->sc_if.if_ipackets++;
518 sc->sc_if.if_ibytes += len;
519 top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, &sc->sc_if, 0);
520 if (top) {
521 if (sc->sc_if.if_bpf)
522 lptap(&sc->sc_if, top);
523 if (! IF_HANDOFF(&ipintrq, top, NULL)) {
524 lprintf("DROP");
525 } else {
526 schednetisr(NETISR_IP);
527 }
523 netisr_queue(NETISR_IP, top);
528 }
529 goto done;
530 }
531 while ((ppb_rstr(ppbus) & LPIP_SHAKE)) {
532 len = sc->sc_if.if_mtu + LPIPHDRLEN;
533 bp = sc->sc_ifbuf;
534 while (len--) {
535

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

564
565 len -= LPIPHDRLEN;
566 sc->sc_if.if_ipackets++;
567 sc->sc_if.if_ibytes += len;
568 top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, &sc->sc_if, 0);
569 if (top) {
570 if (sc->sc_if.if_bpf)
571 lptap(&sc->sc_if, top);
524 }
525 goto done;
526 }
527 while ((ppb_rstr(ppbus) & LPIP_SHAKE)) {
528 len = sc->sc_if.if_mtu + LPIPHDRLEN;
529 bp = sc->sc_ifbuf;
530 while (len--) {
531

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

560
561 len -= LPIPHDRLEN;
562 sc->sc_if.if_ipackets++;
563 sc->sc_if.if_ibytes += len;
564 top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, &sc->sc_if, 0);
565 if (top) {
566 if (sc->sc_if.if_bpf)
567 lptap(&sc->sc_if, top);
572 if (! IF_HANDOFF(&ipintrq, top, NULL)) {
573 lprintf("DROP");
574 } else {
575 schednetisr(NETISR_IP);
576 }
568 netisr_queue(NETISR_IP, top);
577 }
578 }
579 goto done;
580
581 err:
582 ppb_wdtr(ppbus, 0);
583 lprintf("R");
584 sc->sc_if.if_ierrors++;

--- 200 unchanged lines hidden ---
569 }
570 }
571 goto done;
572
573 err:
574 ppb_wdtr(ppbus, 0);
575 lprintf("R");
576 sc->sc_if.if_ierrors++;

--- 200 unchanged lines hidden ---