Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 1998 14:50:37 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Parag Patel <parag@cgt.com>
Cc:        current@FreeBSD.ORG, tjm@codegen.com, eric@needhams.com
Subject:   Re: Mod to doscmd's port.c to directly access parallel ports 
Message-ID:  <199810292250.OAA00408@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 29 Oct 1998 10:17:04 PST." <199810291817.KAA24369@pinhead.parag.codegen.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810292250.OAA00408>