From owner-freebsd-current Thu Oct 29 14:51:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA06049 for freebsd-current-outgoing; Thu, 29 Oct 1998 14:51:34 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA05912 for ; Thu, 29 Oct 1998 14:51:26 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id OAA00408; Thu, 29 Oct 1998 14:50:37 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810292250.OAA00408@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Parag Patel cc: current@FreeBSD.ORG, tjm@codegen.com, eric@needhams.com Subject: Re: Mod to doscmd's port.c to directly access parallel ports In-reply-to: Your message of "Thu, 29 Oct 1998 10:17:04 PST." <199810291817.KAA24369@pinhead.parag.codegen.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 29 Oct 1998 14:50:37 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > It was just pointed out to me that I'd screwed up the mod for iounmap(). > > > static void > > iounmap(int port, int cnt) > > { > >! if (port + cnt >= MAXPORT) { > >! errno = ERANGE; > >! goto bad; > >! } > >! if (i386_set_ioperm(port, cnt, 1) < 0) { > ^^^ > 0 > >! bad: > >! perror("iounmap"); > >! quit(1); > >! } > > } > > Oops. I've submitted the proper fix using send-pr. Thanks! > > Actually, this rather slows down the whole port-access quite a bit. I'm inclined to set the port access on at startup and off on exit. That would definitely be the preferred option. Please update the PR when you've made the changes; I have an interest in seeing this work. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message