From f956b7cd12238844824278a57b019ddcbf0525a3 Mon Sep 17 00:00:00 2001 From: nsouch Date: Sat, 9 Jan 1999 18:10:37 +0000 Subject: Fix Linux compatible mode. ppb_rxxx() calls are chars, inb() is int. --- sys/dev/ppbus/if_plip.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index bde20a4..7d64cd2 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp - * $Id: if_plip.c,v 1.5 1998/10/24 18:55:53 msmith Exp $ + * $Id: if_plip.c,v 1.6 1998/11/07 14:35:41 nsouch Exp $ */ /* @@ -336,17 +336,16 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) } if (((ifp->if_flags & IFF_UP)) && (!(ifp->if_flags & IFF_RUNNING))) { - /* - * Try to allocate the ppbus as soon as possible - * With ppbus allocation, interrupts are enabled - * Now IFF_UP means that we own the bus - * - * XXX + /* XXX * Should the request be interruptible? */ if ((error = ppb_request_bus(&sc->lp_dev, PPB_WAIT|PPB_INTR))) return (error); + /* Now IFF_UP means that we own the bus */ + + ppb_set_mode(&sc->lp_dev, PPB_COMPATIBLE); + if (lpinittables()) { ppb_release_bus(&sc->lp_dev); return ENOBUFS; @@ -428,7 +427,7 @@ clpoutbyte (u_char byte, int spin, struct ppb_device *dev) static __inline int clpinbyte (int spin, struct ppb_device *dev) { - int c, cl; + u_char c, cl; while((ppb_rstr(dev) & CLPIP_SHAKE)) if(!--spin) { -- cgit v1.1