diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2016-10-29 11:00:20 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2016-10-29 11:00:20 +0000 |
commit | 8ede9ef6d0772dd7f1546b7bf57ae8aad03eacc9 (patch) | |
tree | 0d9f2beb5023a4ca4f807d874a98482838ce9644 /sys | |
parent | 9c099d1f258adf679339dc57cb8035576e324dc6 (diff) |
Make PHY address lookups fail instead of using CAM-0100 entries
when the system board is unhandled.
Diffstat (limited to 'sys')
-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 |