attansic: Upgrade to FreeBSD 12.
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008, Pyun YongHyeon <[email protected]>
|
* Copyright (c) 2008, Pyun YongHyeon <[email protected]>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -28,7 +30,7 @@
|
|||||||
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
|
/* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD: releng/12.0/sys/dev/age/if_age.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>
|
||||||
@@ -181,6 +183,8 @@ static driver_t age_driver = {
|
|||||||
static devclass_t age_devclass;
|
static devclass_t age_devclass;
|
||||||
|
|
||||||
DRIVER_MODULE(age, pci, age_driver, age_devclass, 0, 0);
|
DRIVER_MODULE(age, pci, age_driver, age_devclass, 0, 0);
|
||||||
|
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, age, age_devs,
|
||||||
|
nitems(age_devs));
|
||||||
DRIVER_MODULE(miibus, age, miibus_driver, miibus_devclass, 0, 0);
|
DRIVER_MODULE(miibus, age, miibus_driver, miibus_devclass, 0, 0);
|
||||||
|
|
||||||
static struct resource_spec age_res_spec_mem[] = {
|
static struct resource_spec age_res_spec_mem[] = {
|
||||||
@@ -1401,11 +1405,7 @@ age_setwol(struct age_softc *sc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
AGE_UNLOCK(sc);
|
AGE_UNLOCK(sc);
|
||||||
#ifdef __HAIKU__
|
|
||||||
DELAY(1);
|
|
||||||
#else
|
|
||||||
pause("agelnk", hz);
|
pause("agelnk", hz);
|
||||||
#endif
|
|
||||||
AGE_LOCK(sc);
|
AGE_LOCK(sc);
|
||||||
}
|
}
|
||||||
if (i == MII_ANEGTICKS_GIGE)
|
if (i == MII_ANEGTICKS_GIGE)
|
||||||
@@ -2165,11 +2165,6 @@ age_int_task(void *arg, int pending)
|
|||||||
sc->age_cdata.age_cmb_block_map,
|
sc->age_cdata.age_cmb_block_map,
|
||||||
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
|
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
|
||||||
|
|
||||||
#if 0
|
|
||||||
printf("INTR: 0x%08x\n", status);
|
|
||||||
status &= ~INTR_DIS_DMA;
|
|
||||||
CSR_WRITE_4(sc, AGE_INTR_STATUS, status | INTR_DIS_INT);
|
|
||||||
#endif
|
|
||||||
ifp = sc->age_ifp;
|
ifp = sc->age_ifp;
|
||||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
|
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
|
||||||
if ((status & INTR_CMB_RX) != 0)
|
if ((status & INTR_CMB_RX) != 0)
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -24,7 +26,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/age/if_agereg.h 326255 2017-11-27 14:52:40Z pfg $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _IF_AGEREG_H
|
#ifndef _IF_AGEREG_H
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -24,7 +26,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/age/if_agevar.h 326255 2017-11-27 14:52:40Z pfg $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _IF_AGEVAR_H
|
#ifndef _IF_AGEVAR_H
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -26,7 +28,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD: releng/12.0/sys/dev/mii/atphy.c 326255 2017-11-27 14:52:40Z pfg $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Driver for the Attansic/Atheros F1 10/100/1000 PHY.
|
* Driver for the Attansic/Atheros F1 10/100/1000 PHY.
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008, Pyun YongHyeon
|
* Copyright (c) 2008, Pyun YongHyeon
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -24,7 +26,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/mii/atphyreg.h 326255 2017-11-27 14:52:40Z pfg $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DEV_MII_ATPHYREG_H_
|
#ifndef _DEV_MII_ATPHYREG_H_
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -28,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD: releng/12.0/sys/dev/ae/if_ae.c 339735 2018-10-25 17:00:39Z brooks $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@@ -175,6 +177,8 @@ static driver_t ae_driver = {
|
|||||||
static devclass_t ae_devclass;
|
static devclass_t ae_devclass;
|
||||||
|
|
||||||
DRIVER_MODULE(ae, pci, ae_driver, ae_devclass, 0, 0);
|
DRIVER_MODULE(ae, pci, ae_driver, ae_devclass, 0, 0);
|
||||||
|
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, ae, ae_devs,
|
||||||
|
nitems(ae_devs));
|
||||||
DRIVER_MODULE(miibus, ae, miibus_driver, miibus_devclass, 0, 0);
|
DRIVER_MODULE(miibus, ae, miibus_driver, miibus_devclass, 0, 0);
|
||||||
MODULE_DEPEND(ae, pci, 1, 1, 1);
|
MODULE_DEPEND(ae, pci, 1, 1, 1);
|
||||||
MODULE_DEPEND(ae, ether, 1, 1, 1);
|
MODULE_DEPEND(ae, ether, 1, 1, 1);
|
||||||
@@ -1065,11 +1069,7 @@ ae_retrieve_address(ae_softc_t *sc)
|
|||||||
if (bootverbose)
|
if (bootverbose)
|
||||||
device_printf(sc->dev,
|
device_printf(sc->dev,
|
||||||
"Generating random ethernet address.\n");
|
"Generating random ethernet address.\n");
|
||||||
#ifdef __HAIKU__
|
|
||||||
eaddr[0] = random();
|
|
||||||
#else
|
|
||||||
eaddr[0] = arc4random();
|
eaddr[0] = arc4random();
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set OUI to ASUSTek COMPUTER INC.
|
* Set OUI to ASUSTek COMPUTER INC.
|
||||||
@@ -1700,7 +1700,7 @@ ae_stop_txmac(ae_softc_t *sc)
|
|||||||
/*
|
/*
|
||||||
* Wait for IDLE state.
|
* Wait for IDLE state.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < AE_IDLE_TIMEOUT; i--) {
|
for (i = 0; i < AE_IDLE_TIMEOUT; i++) {
|
||||||
val = AE_READ_4(sc, AE_IDLE_REG);
|
val = AE_READ_4(sc, AE_IDLE_REG);
|
||||||
if ((val & (AE_IDLE_TXMAC | AE_IDLE_DMAREAD)) == 0)
|
if ((val & (AE_IDLE_TXMAC | AE_IDLE_DMAREAD)) == 0)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD: releng/12.0/sys/dev/ae/if_aereg.h 326255 2017-11-27 14:52:40Z pfg $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
/*-
|
/*-
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||||
|
*
|
||||||
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
* Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -22,7 +24,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $FreeBSD$
|
* $FreeBSD: releng/12.0/sys/dev/ae/if_aevar.h 326255 2017-11-27 14:52:40Z pfg $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef IF_AEVAR_H
|
#ifndef IF_AEVAR_H
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
/* $NetBSD: ukphy.c,v 1.2 1999/04/23 04:24:32 thorpej Exp $ */
|
/* $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.
|
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD: releng/12.0/sys/dev/mii/ukphy.c 326255 2017-11-27 14:52:40Z pfg $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* driver for generic unknown PHYs
|
* driver for generic unknown PHYs
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
/* $NetBSD: ukphy_subr.c,v 1.2 1998/11/05 04:08:02 thorpej Exp $ */
|
/* $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.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -31,7 +33,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__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.
|
* Subroutines shared by the ukphy driver and other PHY drivers.
|
||||||
|
|||||||
Reference in New Issue
Block a user