svn commit: r327381 - in head/sys: conf dev/ep i386/isa modules modules/elink modules/ep

Konstantin Belousov kib at FreeBSD.org
Sat Dec 30 11:42:51 UTC 2017


Author: kib
Date: Sat Dec 30 11:42:49 2017
New Revision: 327381
URL: https://svnweb.freebsd.org/changeset/base/327381

Log:
  Move i386/isa/elink.[hc] to dev/ep.
  
  The ep(4) driver is the only consumer of the two functions from
  elink.c.  I removed the standalone module as well, and most likely,
  the module metadata is not needed anywhere, but this is for later
  cleanup.
  
  Discussed with:	imp, jhb
  Sponsored by:	The FreeBSD Foundation

Added:
  head/sys/dev/ep/elink.c
     - copied, changed from r327380, head/sys/i386/isa/elink.c
  head/sys/dev/ep/elink.h
     - copied unchanged from r327380, head/sys/i386/isa/elink.h
Deleted:
  head/sys/i386/isa/elink.c
  head/sys/i386/isa/elink.h
  head/sys/modules/elink/
Modified:
  head/sys/conf/files.i386
  head/sys/dev/ep/if_ep_isa.c
  head/sys/modules/Makefile
  head/sys/modules/ep/Makefile

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Sat Dec 30 11:33:04 2017	(r327380)
+++ head/sys/conf/files.i386	Sat Dec 30 11:42:49 2017	(r327381)
@@ -201,6 +201,7 @@ dev/ed/if_ed_isa.c		optional ed isa
 dev/ed/if_ed_wd80x3.c		optional ed isa
 dev/ed/if_ed_hpp.c		optional ed isa ed_hpp
 dev/ed/if_ed_sic.c		optional ed isa ed_sic
+dev/ep/elink.c			optional ep
 dev/fb/fb.c			optional fb | vga
 dev/fb/s3_pci.c			optional s3pci
 dev/fb/vesa.c			optional vga vesa
@@ -519,7 +520,6 @@ i386/ibcs2/ibcs2_util.c		optional ibcs2
 i386/ibcs2/ibcs2_xenix.c	optional ibcs2
 i386/ibcs2/ibcs2_xenix_sysent.c	optional ibcs2
 i386/ibcs2/imgact_coff.c	optional ibcs2
-i386/isa/elink.c		optional ep
 i386/isa/pmtimer.c		optional pmtimer
 i386/isa/prof_machdep.c		optional profiling-routine
 i386/linux/imgact_linux.c	optional compat_linux

Copied and modified: head/sys/dev/ep/elink.c (from r327380, head/sys/i386/isa/elink.c)
==============================================================================
--- head/sys/i386/isa/elink.c	Sat Dec 30 11:33:04 2017	(r327380, copy source)
+++ head/sys/dev/ep/elink.c	Sat Dec 30 11:42:49 2017	(r327381)
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 
 #include <machine/cpufunc.h>
 
-#include <i386/isa/elink.h>
+#include <dev/ep/elink.h>
 
 /*
  * Issue a `global reset' to all cards, and reset the ID state machines.  We

Copied: head/sys/dev/ep/elink.h (from r327380, head/sys/i386/isa/elink.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/ep/elink.h	Sat Dec 30 11:42:49 2017	(r327381, copy of r327380, head/sys/i386/isa/elink.h)
@@ -0,0 +1,44 @@
+/*	$NetBSD: elink.h,v 1.3 1994/10/27 04:17:11 cgd Exp $	*/
+
+/*-
+ * SPDX-License-Identifier: BSD-4-Clause
+ *
+ * Copyright (c) 1994 Charles Hannum.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by Charles Hannum.
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#define	ELINK_ID_PORT	0x100
+#define	ELINK_RESET	0xc0
+
+#define	ELINK_507_POLY	0xe7
+#define	ELINK_509_POLY	0xcf
+#define	TLINK_619_POLY	0x63
+
+void elink_reset(void);
+void elink_idseq(u_char p);

Modified: head/sys/dev/ep/if_ep_isa.c
==============================================================================
--- head/sys/dev/ep/if_ep_isa.c	Sat Dec 30 11:33:04 2017	(r327380)
+++ head/sys/dev/ep/if_ep_isa.c	Sat Dec 30 11:42:49 2017	(r327381)
@@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/ep/if_epvar.h>
 
 #ifdef __i386__
-#include <i386/isa/elink.h>
+#include <dev/ep/elink.h>
 #endif
 
 #ifdef __i386__

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Sat Dec 30 11:33:04 2017	(r327380)
+++ head/sys/modules/Makefile	Sat Dec 30 11:42:49 2017	(r327381)
@@ -115,7 +115,6 @@ SUBDIR=	\
 	dummynet \
 	${_ed} \
 	${_efirt} \
-	${_elink} \
 	${_em} \
 	${_ena} \
 	${_ep} \
@@ -742,7 +741,6 @@ _coff=		coff
 .if ${MK_SOURCELESS_UCODE} != "no"
 _cp=		cp
 .endif
-_elink=		elink
 _glxiic=	glxiic
 _glxsb=		glxsb
 #_ibcs2=		ibcs2

Modified: head/sys/modules/ep/Makefile
==============================================================================
--- head/sys/modules/ep/Makefile	Sat Dec 30 11:33:04 2017	(r327380)
+++ head/sys/modules/ep/Makefile	Sat Dec 30 11:42:49 2017	(r327381)
@@ -7,6 +7,9 @@ SYSDIR?=${SRCTOP}/sys
 
 KMOD=	if_ep
 SRCS=	if_ep.c
+.if ${MACHINE_CPUARCH} == "i386"
+SRCS+=	elink.c
+.endif
 SRCS+=	if_ep_pccard.c pccarddevs.h card_if.h
 SRCS+=	if_ep_isa.c isa_if.h
 SRCS+=	bus_if.h device_if.h


More information about the svn-src-all mailing list