diff options
author | 2016-10-29 11:00:19 +0000 | |
---|---|---|
committer | 2016-10-29 11:00:19 +0000 | |
commit | 2525b6a022296151a9aec5435163d3ad165b5ee2 (patch) | |
tree | 0316921366a5cf416b9cbb5445ce779d5b6deaa6 | |
parent | sync with -r1.95 of amd64/vmm.c: (diff) | |
download | wireguard-openbsd-2525b6a022296151a9aec5435163d3ad165b5ee2.tar.xz wireguard-openbsd-2525b6a022296151a9aec5435163d3ad165b5ee2.zip |
Make PHY address lookups fail instead of using CAM-0100 entries
when the system board is unhandled.
-rw-r--r-- | sys/arch/octeon/dev/cn30xxgmx.c | 7 | ||||
-rw-r--r-- | sys/arch/octeon/include/octeonvar.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/octeon/dev/cn30xxgmx.c b/sys/arch/octeon/dev/cn30xxgmx.c index 9f95a26f6e8..0a265d8cc8c 100644 --- a/sys/arch/octeon/dev/cn30xxgmx.c +++ b/sys/arch/octeon/dev/cn30xxgmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxgmx.c,v 1.28 2016/10/21 15:15:08 visa Exp $ */ +/* $OpenBSD: cn30xxgmx.c,v 1.29 2016/10/29 11:00:19 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -196,10 +196,13 @@ cn30xxgmx_port_phy_addr(int port) return port - 16; /* GMX1: eth[0-3] */ return -1; - default: + case BOARD_TYPE_CN3010_EVB_HS5: if (port >= nitems(octeon_eth_phy_table)) return -1; return octeon_eth_phy_table[port]; + + default: + return -1; } } diff --git a/sys/arch/octeon/include/octeonvar.h b/sys/arch/octeon/include/octeonvar.h index a9304565383..5b3ac64eeaf 100644 --- a/sys/arch/octeon/include/octeonvar.h +++ b/sys/arch/octeon/include/octeonvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: octeonvar.h,v 1.31 2016/07/16 10:19:55 visa Exp $ */ +/* $OpenBSD: octeonvar.h,v 1.32 2016/10/29 11:00:19 visa Exp $ */ /* $NetBSD: maltavar.h,v 1.3 2002/03/18 10:10:16 simonb Exp $ */ /*- @@ -178,6 +178,7 @@ struct octeon_fau_map { * NB: BOARD_TYPE_UBIQUITI_E100 is also used by other vendors, but we don't run * on those boards yet. */ +#define BOARD_TYPE_CN3010_EVB_HS5 11 #define BOARD_TYPE_UBIQUITI_E100 20002 #define BOARD_TYPE_UBIQUITI_E200 20003 #define BOARD_TYPE_DSR_500 20015 |