Deleted Added
full compact
if_ep.c (106937) if_ep.c (109623)
1/*
2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca>
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

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

33/*
34 * Modified from the FreeBSD 1.1.5.1 version by:
35 * Andres Vega Garcia
36 * INRIA - Sophia Antipolis, France
37 * avega@sophia.inria.fr
38 */
39
40/*
1/*
2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca>
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

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

33/*
34 * Modified from the FreeBSD 1.1.5.1 version by:
35 * Andres Vega Garcia
36 * INRIA - Sophia Antipolis, France
37 * avega@sophia.inria.fr
38 */
39
40/*
41 * $FreeBSD: head/sys/dev/ep/if_ep.c 106937 2002-11-14 23:54:55Z sam $
41 * $FreeBSD: head/sys/dev/ep/if_ep.c 109623 2003-01-21 08:56:16Z alfred $
42 *
43 * Promiscuous mode added and interrupt logic slightly changed
44 * to reduce the number of adapter failures. Transceiver select
45 * logic changed to use value from EEPROM. Autoconfiguration
46 * features added.
47 * Done by:
48 * Serge Babkin
49 * Chelindbank (Chelyabinsk, Russia)

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

681 sc->rx_overrunl++;
682#endif
683 }
684 goto out;
685 }
686 rx_fifo = rx_fifo2 = status & RX_BYTES_MASK;
687
688 if (EP_FTST(sc, F_RX_FIRST)) {
42 *
43 * Promiscuous mode added and interrupt logic slightly changed
44 * to reduce the number of adapter failures. Transceiver select
45 * logic changed to use value from EEPROM. Autoconfiguration
46 * features added.
47 * Done by:
48 * Serge Babkin
49 * Chelindbank (Chelyabinsk, Russia)

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

681 sc->rx_overrunl++;
682#endif
683 }
684 goto out;
685 }
686 rx_fifo = rx_fifo2 = status & RX_BYTES_MASK;
687
688 if (EP_FTST(sc, F_RX_FIRST)) {
689 MGETHDR(m, M_DONTWAIT, MT_DATA);
689 MGETHDR(m, M_NOWAIT, MT_DATA);
690 if (!m)
691 goto out;
692 if (rx_fifo >= MINCLSIZE)
690 if (!m)
691 goto out;
692 if (rx_fifo >= MINCLSIZE)
693 MCLGET(m, M_DONTWAIT);
693 MCLGET(m, M_NOWAIT);
694 sc->top = sc->mcur = top = m;
695#define EROUND ((sizeof(struct ether_header) + 3) & ~3)
696#define EOFF (EROUND - sizeof(struct ether_header))
697 top->m_data += EOFF;
698
699 /* Read what should be the header. */
700 insw(BASE + EP_W1_RX_PIO_RD_1,
701 mtod(top, caddr_t), sizeof(struct ether_header) / 2);

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

709 sc->cur_len += rx_fifo2;
710 }
711
712 /* Reads what is left in the RX FIFO */
713 while (rx_fifo > 0) {
714 lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
715 if (lenthisone == 0) { /* no room in this one */
716 mcur = m;
694 sc->top = sc->mcur = top = m;
695#define EROUND ((sizeof(struct ether_header) + 3) & ~3)
696#define EOFF (EROUND - sizeof(struct ether_header))
697 top->m_data += EOFF;
698
699 /* Read what should be the header. */
700 insw(BASE + EP_W1_RX_PIO_RD_1,
701 mtod(top, caddr_t), sizeof(struct ether_header) / 2);

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

709 sc->cur_len += rx_fifo2;
710 }
711
712 /* Reads what is left in the RX FIFO */
713 while (rx_fifo > 0) {
714 lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
715 if (lenthisone == 0) { /* no room in this one */
716 mcur = m;
717 MGET(m, M_DONTWAIT, MT_DATA);
717 MGET(m, M_NOWAIT, MT_DATA);
718 if (!m)
719 goto out;
720 if (rx_fifo >= MINCLSIZE)
718 if (!m)
719 goto out;
720 if (rx_fifo >= MINCLSIZE)
721 MCLGET(m, M_DONTWAIT);
721 MCLGET(m, M_NOWAIT);
722 m->m_len = 0;
723 mcur->m_next = m;
724 lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
725 }
726 if (EP_FTST(sc, F_ACCESS_32_BITS)) { /* default for EISA configured cards*/
727 insl(BASE + EP_W1_RX_PIO_RD_1, mtod(m, caddr_t) + m->m_len,
728 lenthisone / 4);
729 m->m_len += (lenthisone & ~3);

--- 218 unchanged lines hidden ---
722 m->m_len = 0;
723 mcur->m_next = m;
724 lenthisone = min(rx_fifo, M_TRAILINGSPACE(m));
725 }
726 if (EP_FTST(sc, F_ACCESS_32_BITS)) { /* default for EISA configured cards*/
727 insl(BASE + EP_W1_RX_PIO_RD_1, mtod(m, caddr_t) + m->m_len,
728 lenthisone / 4);
729 m->m_len += (lenthisone & ~3);

--- 218 unchanged lines hidden ---