From 8ede9ef6d0772dd7f1546b7bf57ae8aad03eacc9 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Sat, 29 Oct 2016 11:00:20 +0000 Subject: Make PHY address lookups fail instead of using CAM-0100 entries when the system board is unhandled. --- sys/arch/octeon/dev/cn30xxgmx.c | 7 +++++-- sys/arch/octeon/include/octeonvar.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3