From owner-svn-src-all@freebsd.org Fri Mar 20 19:28:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27EF02708B3; Fri, 20 Mar 2020 19:28:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48kYjj0K5Lz4YGj; Fri, 20 Mar 2020 19:28:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01687774; Fri, 20 Mar 2020 19:28:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02KJSuD4085298; Fri, 20 Mar 2020 19:28:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02KJSt3s085292; Fri, 20 Mar 2020 19:28:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003201928.02KJSt3s085292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 20 Mar 2020 19:28:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359181 - in head/sys/dev: ce cp cx X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/dev: ce cp cx X-SVN-Commit-Revision: 359181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2020 19:28:57 -0000 Author: emaste Date: Fri Mar 20 19:28:55 2020 New Revision: 359181 URL: https://svnweb.freebsd.org/changeset/base/359181 Log: Use a separate copy of machdep.h in cp and ce drivers Previously they included sys/dev/cx/machdep.h, but the cx driver was retired in r359178. These drivers haven't had real development for a decade or more so there's no real benefit in sharing this file; just copy it to the ce and cp subdirs. Added: head/sys/dev/ce/machdep.h - copied unchanged from r359180, head/sys/dev/cx/machdep.h head/sys/dev/cp/machdep.h - copied unchanged from r359180, head/sys/dev/cx/machdep.h Deleted: head/sys/dev/cx/ Modified: head/sys/dev/ce/ceddk.c head/sys/dev/ce/if_ce.c head/sys/dev/cp/cpddk.c head/sys/dev/cp/if_cp.c Modified: head/sys/dev/ce/ceddk.c ============================================================================== --- head/sys/dev/ce/ceddk.c Fri Mar 20 19:23:55 2020 (r359180) +++ head/sys/dev/ce/ceddk.c Fri Mar 20 19:28:55 2020 (r359181) @@ -18,7 +18,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #undef CE_DDK_DEBUG_ENABLED Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Fri Mar 20 19:23:55 2020 (r359180) +++ head/sys/dev/ce/if_ce.c Fri Mar 20 19:28:55 2020 (r359181) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); # define PP_CISCO IFF_LINK2 # include #endif -#include +#include #include #include #include Copied: head/sys/dev/ce/machdep.h (from r359180, head/sys/dev/cx/machdep.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ce/machdep.h Fri Mar 20 19:28:55 2020 (r359181, copy of r359180, head/sys/dev/cx/machdep.h) @@ -0,0 +1,97 @@ +/*- + * Cronyx DDK: platform dependent definitions. + * + * Copyright (C) 1998-1999 Cronyx Engineering + * Author: Alexander Kvitchenko, + * + * Copyright (C) 2001-2003 Cronyx Engineering. + * Author: Roman Kurakin, + * + * This software is distributed with NO WARRANTIES, not even the implied + * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Authors grant any other persons or organisations permission to use + * or modify this software as long as this message is kept with the software, + * all derivative works or modified versions. + * + * Cronyx Id: machdep.h,v 1.3.4.3 2003/11/27 14:21:58 rik Exp $ + * $FreeBSD$ + */ + +/* + * DOS (Borland Turbo C++ 1.0) + */ +#if defined (MSDOS) || defined (__MSDOS__) +# include +# include +# define inb(port) inportb(port) +# define inw(port) inport(port) +# define outb(port,b) outportb(port,b) +# define outw(port,w) outport(port,w) +# define GETTICKS() biostime(0,0L) +#else + +/* + * Windows NT + */ +#ifdef NDIS_MINIPORT_DRIVER +# include +# define inb(port) inp((unsigned short)(port)) +# define inw(port) inpw((unsigned short)(port)) +# define outb(port,b) outp((unsigned short)(port),b) +# define outw(port,w) outpw((unsigned short)(port),(unsigned short)(w)) +#pragma warning (disable: 4761) +#pragma warning (disable: 4242) +#pragma warning (disable: 4244) +#define ulong64 unsigned __int64 +#else + +/* + * Linux + */ +#ifdef __linux__ +# undef REALLY_SLOW_IO +# include /* should swap outb() arguments */ +# include +# include + static inline void __ddk_outb (unsigned port, unsigned char byte) + { outb (byte, port); } + static inline void __ddk_outw (unsigned port, unsigned short word) + { outw (word, port); } +# undef outb +# undef outw +# define outb(port,val) __ddk_outb(port, val) +# define outw(port,val) __ddk_outw(port, val) +# define GETTICKS() (jiffies * 200 / 11 / HZ) +#else + +/* + * FreeBSD and BSD/OS + */ +#ifdef __FreeBSD__ +# include +# include +# include +# include +# define port_t int + +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif +#endif + +#endif +#endif +#endif + +#ifndef inline +# ifdef __CC_SUPPORTS___INLINE__ +# define inline __inline__ +# else +# define inline /**/ +# endif +#endif + +#ifndef ulong64 +#define ulong64 unsigned long long +#endif Modified: head/sys/dev/cp/cpddk.c ============================================================================== --- head/sys/dev/cp/cpddk.c Fri Mar 20 19:23:55 2020 (r359180) +++ head/sys/dev/cp/cpddk.c Fri Mar 20 19:28:55 2020 (r359181) @@ -20,7 +20,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #define CPDDK_COBF_SAFE #include Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Fri Mar 20 19:23:55 2020 (r359180) +++ head/sys/dev/cp/if_cp.c Fri Mar 20 19:28:55 2020 (r359181) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); # define PP_CISCO IFF_LINK2 # include #endif -#include +#include #include #include #include Copied: head/sys/dev/cp/machdep.h (from r359180, head/sys/dev/cx/machdep.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/cp/machdep.h Fri Mar 20 19:28:55 2020 (r359181, copy of r359180, head/sys/dev/cx/machdep.h) @@ -0,0 +1,97 @@ +/*- + * Cronyx DDK: platform dependent definitions. + * + * Copyright (C) 1998-1999 Cronyx Engineering + * Author: Alexander Kvitchenko, + * + * Copyright (C) 2001-2003 Cronyx Engineering. + * Author: Roman Kurakin, + * + * This software is distributed with NO WARRANTIES, not even the implied + * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Authors grant any other persons or organisations permission to use + * or modify this software as long as this message is kept with the software, + * all derivative works or modified versions. + * + * Cronyx Id: machdep.h,v 1.3.4.3 2003/11/27 14:21:58 rik Exp $ + * $FreeBSD$ + */ + +/* + * DOS (Borland Turbo C++ 1.0) + */ +#if defined (MSDOS) || defined (__MSDOS__) +# include +# include +# define inb(port) inportb(port) +# define inw(port) inport(port) +# define outb(port,b) outportb(port,b) +# define outw(port,w) outport(port,w) +# define GETTICKS() biostime(0,0L) +#else + +/* + * Windows NT + */ +#ifdef NDIS_MINIPORT_DRIVER +# include +# define inb(port) inp((unsigned short)(port)) +# define inw(port) inpw((unsigned short)(port)) +# define outb(port,b) outp((unsigned short)(port),b) +# define outw(port,w) outpw((unsigned short)(port),(unsigned short)(w)) +#pragma warning (disable: 4761) +#pragma warning (disable: 4242) +#pragma warning (disable: 4244) +#define ulong64 unsigned __int64 +#else + +/* + * Linux + */ +#ifdef __linux__ +# undef REALLY_SLOW_IO +# include /* should swap outb() arguments */ +# include +# include + static inline void __ddk_outb (unsigned port, unsigned char byte) + { outb (byte, port); } + static inline void __ddk_outw (unsigned port, unsigned short word) + { outw (word, port); } +# undef outb +# undef outw +# define outb(port,val) __ddk_outb(port, val) +# define outw(port,val) __ddk_outw(port, val) +# define GETTICKS() (jiffies * 200 / 11 / HZ) +#else + +/* + * FreeBSD and BSD/OS + */ +#ifdef __FreeBSD__ +# include +# include +# include +# include +# define port_t int + +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif +#endif + +#endif +#endif +#endif + +#ifndef inline +# ifdef __CC_SUPPORTS___INLINE__ +# define inline __inline__ +# else +# define inline /**/ +# endif +#endif + +#ifndef ulong64 +#define ulong64 unsigned long long +#endif