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]> * Copyright (c) 2003 Stuart Walsh<[email protected]>
* and Duncan Barclay<[email protected]> * and Duncan Barclay<[email protected]>
* *
@@ -26,7 +28,7 @@
#include <sys/cdefs.h> #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/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@@ -155,6 +157,8 @@ static driver_t bfe_driver = {
static devclass_t bfe_devclass; static devclass_t bfe_devclass;
DRIVER_MODULE(bfe, pci, bfe_driver, bfe_devclass, 0, 0); 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); 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; int nsegs;
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (!m) if (m == NULL)
return (ENOBUFS); return (ENOBUFS);
m->m_len = m->m_pkthdr.len = MCLBYTES; m->m_len = m->m_pkthdr.len = MCLBYTES;
@@ -1,4 +1,6 @@
/*- /*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2003 Stuart Walsh * Copyright (c) 2003 Stuart Walsh
* *
* Redistribution and use in source and binary forms, with or without * 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 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
/* $FreeBSD$ */ /* $FreeBSD: releng/12.0/sys/dev/bfe/if_bfereg.h 326255 2017-11-27 14:52:40Z pfg $ */
#ifndef _BFE_H #ifndef _BFE_H
#define _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. * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@@ -56,7 +58,7 @@
*/ */
#include <sys/cdefs.h> #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 * 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); rval = mii_phy_dev_probe(dev, bmtphys_lp, BUS_PROBE_LOW_PRIORITY);
#ifndef __HAIKU__ #ifndef __HAIKU__
if (rval <= 0) if (rval <= 0)
#else return (rval);
if (rval <= 0 && rval != ENXIO) #else /* __HAIKU__ */
/* our BUS_PROBE_* constants are > 0 since errors are < 0 */
if (rval > 0)
return (rval); return (rval);
#endif #endif
return (mii_phy_dev_probe(dev, bmtphys_dp, BUS_PROBE_DEFAULT)); 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. * Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@@ -28,7 +30,7 @@
* *
* from NetBSD: bmtphyreg.h,v 1.1 2001/06/02 21:42:10 thorpej Exp * 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_ #ifndef _DEV_MII_BMTPHYREG_H_