Deleted Added
full compact
if_bge.c (109514) if_bge.c (109623)
1/*
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2001
4 * Bill Paul <wpaul@windriver.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
1/*
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2001
4 * Bill Paul <wpaul@windriver.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/bge/if_bge.c 109514 2003-01-19 02:59:34Z obrien $
33 * $FreeBSD: head/sys/dev/bge/if_bge.c 109623 2003-01-21 08:56:16Z alfred $
34 */
35
36/*
37 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Engineer, Wind River Systems
41 */

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

117
118MODULE_DEPEND(bge, miibus, 1, 1, 1);
119
120/* "controller miibus0" required. See GENERIC if you get errors here. */
121#include "miibus_if.h"
122
123#if !defined(lint)
124static const char rcsid[] =
34 */
35
36/*
37 * Broadcom BCM570x family gigabit ethernet driver for FreeBSD.
38 *
39 * Written by Bill Paul <wpaul@windriver.com>
40 * Senior Engineer, Wind River Systems
41 */

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

117
118MODULE_DEPEND(bge, miibus, 1, 1, 1);
119
120/* "controller miibus0" required. See GENERIC if you get errors here. */
121#include "miibus_if.h"
122
123#if !defined(lint)
124static const char rcsid[] =
125 "$FreeBSD: head/sys/dev/bge/if_bge.c 109514 2003-01-19 02:59:34Z obrien $";
125 "$FreeBSD: head/sys/dev/bge/if_bge.c 109623 2003-01-21 08:56:16Z alfred $";
126#endif
127
128/*
129 * Various supported device vendors/types and their names. Note: the
130 * spec seems to indicate that the hardware still has Alteon's vendor
131 * ID burned into it, though it will always be overriden by the vendor
132 * ID in the EEPROM. Just to be safe, we cover all possibilities.
133 */

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

714 struct bge_softc *sc;
715 int i;
716 struct mbuf *m;
717{
718 struct mbuf *m_new = NULL;
719 struct bge_rx_bd *r;
720
721 if (m == NULL) {
126#endif
127
128/*
129 * Various supported device vendors/types and their names. Note: the
130 * spec seems to indicate that the hardware still has Alteon's vendor
131 * ID burned into it, though it will always be overriden by the vendor
132 * ID in the EEPROM. Just to be safe, we cover all possibilities.
133 */

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

714 struct bge_softc *sc;
715 int i;
716 struct mbuf *m;
717{
718 struct mbuf *m_new = NULL;
719 struct bge_rx_bd *r;
720
721 if (m == NULL) {
722 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
722 MGETHDR(m_new, M_NOWAIT, MT_DATA);
723 if (m_new == NULL) {
724 return(ENOBUFS);
725 }
726
723 if (m_new == NULL) {
724 return(ENOBUFS);
725 }
726
727 MCLGET(m_new, M_DONTWAIT);
727 MCLGET(m_new, M_NOWAIT);
728 if (!(m_new->m_flags & M_EXT)) {
729 m_freem(m_new);
730 return(ENOBUFS);
731 }
732 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
733 } else {
734 m_new = m;
735 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;

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

760{
761 struct mbuf *m_new = NULL;
762 struct bge_rx_bd *r;
763
764 if (m == NULL) {
765 caddr_t *buf = NULL;
766
767 /* Allocate the mbuf. */
728 if (!(m_new->m_flags & M_EXT)) {
729 m_freem(m_new);
730 return(ENOBUFS);
731 }
732 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
733 } else {
734 m_new = m;
735 m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;

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

760{
761 struct mbuf *m_new = NULL;
762 struct bge_rx_bd *r;
763
764 if (m == NULL) {
765 caddr_t *buf = NULL;
766
767 /* Allocate the mbuf. */
768 MGETHDR(m_new, M_DONTWAIT, MT_DATA);
768 MGETHDR(m_new, M_NOWAIT, MT_DATA);
769 if (m_new == NULL) {
770 return(ENOBUFS);
771 }
772
773 /* Allocate the jumbo buffer */
774 buf = bge_jalloc(sc);
775 if (buf == NULL) {
776 m_freem(m_new);

--- 1967 unchanged lines hidden ---
769 if (m_new == NULL) {
770 return(ENOBUFS);
771 }
772
773 /* Allocate the jumbo buffer */
774 buf = bge_jalloc(sc);
775 if (buf == NULL) {
776 m_freem(m_new);

--- 1967 unchanged lines hidden ---