pkgsrc/sysutils/isapnptools/patches/patch-aa
agc c60741ec10 Initial import of isapnptools-1.26 - manually query and configure isapnp
devices.

Provided in PR 17681 by Ben Collver (collver1@attbi.com)

The isapnptools consist of two programs - one allows the dumping of
resource data and generation of a skeleton configuration file, the
other configures ISA PnP hardware using a configuration file.
2002-07-23 12:07:45 +00:00

35 lines
992 B
Text

$NetBSD: patch-aa,v 1.1.1.1 2002/07/23 12:07:45 agc Exp $
--- src/iopl.c Tue May 8 15:14:21 2001
+++ src/iopl.c Mon Jul 22 07:46:37 2002
@@ -61,10 +61,17 @@
*/
ret = iopl(3);
#else
+#if defined(__NetBSD__) && defined(HAVE_LIBI386)
+ /*
+ * Have to get unrestricted access to io ports, as WRITE_DATA port > 0x3ff
+ */
+ ret = i386_iopl(3);
+#else
#ifdef HAVE_IOPERM
/* ALPHA only has ioperm, apparently, so cover all with one permission */
ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 1);
#endif /* HAVE_IOPERM */
+#endif /* !(__NetBSD__ && HAVE_LIBI386) */
#endif /* !HAVE_IOPL */
if (ret < 0) {
@@ -85,9 +92,13 @@
#ifdef HAVE_IOPL
ret = iopl(0);
#else
+#if defined(__NetBSD__) && defined(HAVE_LIBI386)
+ ret = i386_iopl(0);
+#else
#ifdef HAVE_IOPERM
ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 0);
#endif /* HAVE_IOPERM */
+#endif /* !(__NetBSD__ && HAVE_LIBI386) */
#endif /* !HAVE_IOPL */
if (ret < 0) {