From: visa Date: Tue, 9 Mar 2021 14:13:33 +0000 (+0000) Subject: Add initial bits for Check Point UTM-1 EDGE N. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4d62617a9f7e1549f53acfbc5bec806920659501;p=openbsd Add initial bits for Check Point UTM-1 EDGE N. From Thaison Nguyen --- diff --git a/sys/arch/octeon/dev/cn30xxsmi.c b/sys/arch/octeon/dev/cn30xxsmi.c index 0a44f6cc287..4655e3a1180 100644 --- a/sys/arch/octeon/dev/cn30xxsmi.c +++ b/sys/arch/octeon/dev/cn30xxsmi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxsmi.c,v 1.9 2021/02/04 16:16:10 visa Exp $ */ +/* $OpenBSD: cn30xxsmi.c,v 1.10 2021/03/09 14:13:33 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -155,6 +155,10 @@ cn30xxsmi_get_phy(int phandle, int port, struct cn30xxsmi_softc **psmi, static const int cam0100_phys[] = { 0x02, 0x03, 0x22 }; + /* PHY addresses for Check Point UTM-1 EDGE N */ + static const int cpn100_phys[] = { + 0x0c, 0x11, 0x0d + }; /* PHY addresses for Netgear ProSecure UTM25 */ static const int nutm25_phys[] = { 0x00, 0x04, 0x09 @@ -184,6 +188,11 @@ cn30xxsmi_get_phy(int phandle, int port, struct cn30xxsmi_softc **psmi, return ENOENT; switch (octeon_board) { + case BOARD_CHECKPOINT_N100: + if (port >= nitems(cpn100_phys)) + return ENOENT; + reg = cpn100_phys[port]; + break; case BOARD_NETGEAR_UTM25: if (port >= nitems(nutm25_phys)) return ENOENT; diff --git a/sys/arch/octeon/include/octeonvar.h b/sys/arch/octeon/include/octeonvar.h index a1e23746436..fdf230b47b5 100644 --- a/sys/arch/octeon/include/octeonvar.h +++ b/sys/arch/octeon/include/octeonvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: octeonvar.h,v 1.51 2021/02/04 16:16:11 visa Exp $ */ +/* $OpenBSD: octeonvar.h,v 1.52 2021/03/09 14:13:33 visa Exp $ */ /* $NetBSD: maltavar.h,v 1.3 2002/03/18 10:10:16 simonb Exp $ */ /*- @@ -213,6 +213,7 @@ enum cnmac_stat { */ enum octeon_board { BOARD_UNKNOWN, + BOARD_CHECKPOINT_N100, BOARD_CN3010_EVB_HS5, BOARD_DLINK_DSR_500, BOARD_NETGEAR_UTM25, diff --git a/sys/arch/octeon/octeon/machdep.c b/sys/arch/octeon/octeon/machdep.c index a8618fdb9b1..c2397924c46 100644 --- a/sys/arch/octeon/octeon/machdep.c +++ b/sys/arch/octeon/octeon/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.129 2021/02/04 16:16:11 visa Exp $ */ +/* $OpenBSD: machdep.c,v 1.130 2021/03/09 14:13:33 visa Exp $ */ /* * Copyright (c) 2009, 2010 Miodrag Vallat. @@ -843,6 +843,8 @@ get_octeon_board(void) return BOARD_UBIQUITI_E220; case 20010: return BOARD_UBIQUITI_E1000; + case 20011: + return BOARD_CHECKPOINT_N100; case 20012: return BOARD_RHINOLABS_UTM8; case 20015: