summaryrefslogtreecommitdiff
path: root/sys/dev/ppbus/if_plip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ppbus/if_plip.c')
-rw-r--r--sys/dev/ppbus/if_plip.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c
index 7d64cd24fef6c..4bee255fd5a64 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.6 1998/11/07 14:35:41 nsouch Exp $
+ * $Id: if_plip.c,v 1.3 1998/08/17 01:05:23 bde Exp $
*/
/*
@@ -129,9 +129,7 @@
#define LPIPTBLSIZE 256 /* Size of octet translation table */
-#ifndef DEBUG
#define DEBUG
-#endif
#ifndef DEBUG
#define lprintf (void)
@@ -336,16 +334,17 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
}
if (((ifp->if_flags & IFF_UP)) && (!(ifp->if_flags & IFF_RUNNING))) {
- /* XXX
+ /*
+ * 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
* 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;
@@ -394,13 +393,6 @@ lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data)
}
break;
- case SIOCGIFMEDIA:
- /*
- * No ifmedia support at this stage; maybe use it
- * in future for eg. protocol selection.
- */
- return EINVAL;
-
default:
lprintf("LP:ioctl(0x%lx)\n", cmd);
return EINVAL;
@@ -427,7 +419,7 @@ clpoutbyte (u_char byte, int spin, struct ppb_device *dev)
static __inline int
clpinbyte (int spin, struct ppb_device *dev)
{
- u_char c, cl;
+ int c, cl;
while((ppb_rstr(dev) & CLPIP_SHAKE))
if(!--spin) {