3com: Upgrade to FreeBSD 12.

This commit is contained in:
Augustin Cavalier
2018-12-27 16:52:27 -05:00
parent d5b99ecde7
commit 71f1250df5
7 changed files with 39 additions and 15 deletions
@@ -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: releng/11.1/sys/dev/mii/bmtphy.c 257184 2013-10-26 18:40:17Z glebius $");
__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
@@ -136,8 +138,14 @@ bmtphy_probe(device_t dev)
/* Let exphy(4) take precedence for these. */
rval = mii_phy_dev_probe(dev, bmtphys_lp, BUS_PROBE_LOW_PRIORITY);
#ifndef __HAIKU__
if (rval <= 0)
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: releng/11.1/sys/dev/mii/bmtphyreg.h 204646 2010-03-03 17:55:51Z joel $
* $FreeBSD: releng/12.0/sys/dev/mii/bmtphyreg.h 326255 2017-11-27 14:52:40Z pfg $
*/
#ifndef _DEV_MII_BMTPHYREG_H_
@@ -1,6 +1,8 @@
/* $NetBSD: ukphy.c,v 1.2 1999/04/23 04:24:32 thorpej Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
*
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -55,7 +57,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/mii/ukphy.c 257184 2013-10-26 18:40:17Z glebius $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/mii/ukphy.c 326255 2017-11-27 14:52:40Z pfg $");
/*
* driver for generic unknown PHYs
@@ -1,6 +1,8 @@
/* $NetBSD: ukphy_subr.c,v 1.2 1998/11/05 04:08:02 thorpej Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD
*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -31,7 +33,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/mii/ukphy_subr.c 215297 2010-11-14 13:26:10Z marius $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/mii/ukphy_subr.c 326255 2017-11-27 14:52:40Z pfg $");
/*
* Subroutines shared by the ukphy driver and other PHY drivers.
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-4-Clause
*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <[email protected]>. All rights reserved.
*
@@ -31,7 +33,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/xl/if_xl.c 338948 2018-09-26 17:12:14Z imp $");
/*
* 3Com 3c90x Etherlink XL PCI NIC driver
@@ -75,7 +77,7 @@ __FBSDID("$FreeBSD$");
* Columbia University, New York City
*/
/*
* The 3c90x series chips use a bus-master DMA interface for transfering
* The 3c90x series chips use a bus-master DMA interface for transferring
* packets to and from the controller chip. Some of the "vortex" cards
* (3c59x) also supported a bus master mode, however for those chips
* you could only DMA packets to/from a contiguous memory buffer. For
@@ -106,13 +108,15 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/sockio.h>
#include <sys/endian.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/module.h>
#include <sys/socket.h>
#include <sys/taskqueue.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
@@ -330,6 +334,8 @@ static devclass_t xl_devclass;
DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL,
SI_ORDER_ANY);
DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL);
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, xl, xl_devs,
nitems(xl_devs) - 1);
static void
xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
@@ -351,7 +357,7 @@ xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
static void
xl_wait(struct xl_softc *sc)
{
register int i;
int i;
for (i = 0; i < XL_TIMEOUT; i++) {
if ((CSR_READ_2(sc, XL_STATUS) & XL_STAT_CMDBUSY) == 0)
@@ -834,7 +840,7 @@ xl_setmode(struct xl_softc *sc, int media)
static void
xl_reset(struct xl_softc *sc)
{
register int i;
int i;
XL_LOCK_ASSERT(sc);
@@ -2335,9 +2341,9 @@ xl_stats_update(struct xl_softc *sc)
if_inc_counter(ifp, IFCOUNTER_IERRORS, xl_stats.xl_rx_overrun);
if_inc_counter(ifp, IFCOUNTER_COLLISIONS,
xl_stats.xl_tx_multi_collision +
xl_stats.xl_tx_single_collision +
xl_stats.xl_tx_late_collision);
xl_stats.xl_tx_multi_collision +
xl_stats.xl_tx_single_collision +
xl_stats.xl_tx_late_collision);
/*
* Boomerang and cyclone chips have an extra stats counter
@@ -3172,7 +3178,7 @@ xl_watchdog(struct xl_softc *sc)
static void
xl_stop(struct xl_softc *sc)
{
register int i;
int i;
struct ifnet *ifp = sc->xl_ifp;
XL_LOCK_ASSERT(sc);
@@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-4-Clause
*
* Copyright (c) 1997, 1998
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
*
@@ -29,7 +31,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
* $FreeBSD: releng/12.0/sys/dev/xl/if_xlreg.h 325966 2017-11-18 14:26:50Z pfg $
*/
#define XL_EE_READ 0x0080 /* read, 5 bit address */
@@ -1,6 +1,8 @@
/* $NetBSD: exphy.c,v 1.16 1999/04/23 04:24:32 thorpej Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-NetBSD AND BSD-2-Clause
*
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -55,7 +57,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/xl/xlphy.c 257184 2013-10-26 18:40:17Z glebius $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/xl/xlphy.c 326255 2017-11-27 14:52:40Z pfg $");
/*
* driver for 3Com internal PHYs