broadcom440x: Upgrade to FreeBSD 12.

This commit is contained in:
Augustin Cavalier
2018-12-27 16:54:15 -05:00
parent 3bfc859a38
commit 65124582dc
4 changed files with 21 additions and 10 deletions
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2003 Stuart Walsh<[email protected]>
* and Duncan Barclay<[email protected]>
*
@@ -26,7 +28,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bfe/if_bfe.c 338948 2018-09-26 17:12:14Z imp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -155,6 +157,8 @@ static driver_t bfe_driver = {
static devclass_t bfe_devclass;
DRIVER_MODULE(bfe, pci, bfe_driver, bfe_devclass, 0, 0);
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bfe, bfe_devs,
nitems(bfe_devs) - 1);
DRIVER_MODULE(miibus, bfe, miibus_driver, miibus_devclass, 0, 0);
/*
@@ -793,7 +797,7 @@ bfe_list_newbuf(struct bfe_softc *sc, int c)
int nsegs;
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (!m)
if (m == NULL)
return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -819,7 +823,7 @@ bfe_list_newbuf(struct bfe_softc *sc, int c)
rx_header->len = 0;
rx_header->flags = 0;
bus_dmamap_sync(sc->bfe_rxmbuf_tag, r->bfe_map, BUS_DMASYNC_PREREAD);
ctrl = segs[0].ds_len & BFE_DESC_LEN;
KASSERT(ctrl > ETHER_MAX_LEN + 32, ("%s: buffer size too small(%d)!",
__func__, ctrl));
@@ -1402,7 +1406,7 @@ bfe_rxeof(struct bfe_softc *sc)
* Rx status should be read from mbuf such that we can't
* delay bus_dmamap_sync(9). This hardware limiation
* results in inefficent mbuf usage as bfe(4) couldn't
* reuse mapped buffer from errored frame.
* reuse mapped buffer from errored frame.
*/
if (bfe_list_newbuf(sc, cons) != 0) {
if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2003 Stuart Walsh
*
* Redistribution and use in source and binary forms, with or without
@@ -22,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* $FreeBSD$ */
/* $FreeBSD: releng/12.0/sys/dev/bfe/if_bfereg.h 326255 2017-11-27 14:52:40Z pfg $ */
#ifndef _BFE_H
#define _BFE_H
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
*
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -56,7 +58,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/mii/bmtphy.c 326255 2017-11-27 14:52:40Z pfg $");
/*
* Driver for the Broadcom BCM5201/BCM5202 "Mini-Theta" PHYs. This also
@@ -138,11 +140,12 @@ bmtphy_probe(device_t dev)
rval = mii_phy_dev_probe(dev, bmtphys_lp, BUS_PROBE_LOW_PRIORITY);
#ifndef __HAIKU__
if (rval <= 0)
#else
if (rval <= 0 && rval != ENXIO)
return (rval);
#else /* __HAIKU__ */
/* our BUS_PROBE_* constants are > 0 since errors are < 0 */
if (rval > 0)
return (rval);
#endif
return (mii_phy_dev_probe(dev, bmtphys_dp, BUS_PROBE_DEFAULT));
}
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -28,7 +30,7 @@
*
* from NetBSD: bmtphyreg.h,v 1.1 2001/06/02 21:42:10 thorpej Exp
*
* $FreeBSD$
* $FreeBSD: releng/12.0/sys/dev/mii/bmtphyreg.h 326255 2017-11-27 14:52:40Z pfg $
*/
#ifndef _DEV_MII_BMTPHYREG_H_