patch-2.0.36 linux/drivers/char/lp.c
Next file: linux/drivers/char/mem.c
Previous file: linux/drivers/char/isicom.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sun Nov 15 10:32:54 1998
- Orig file:
v2.0.35/linux/drivers/char/lp.c
- Orig date:
Sun Nov 15 10:49:34 1998
diff -u --recursive --new-file v2.0.35/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -89,14 +89,18 @@
while(wait != LP_WAIT(minor)) wait++;
/* control port takes strobe high */
outb_p(( LP_PSELECP | LP_PINITP | LP_PSTROBE ), ( LP_C( minor )));
- /* Wait until NBUSY line goes high */
- count = 0;
- do {
- status = LP_S(minor);
- count++;
- if (need_resched)
- schedule();
- } while (LP_READY(minor, status) && (count<LP_CHAR(minor)));
+
+ if(LP_F(minor)&LP_STRICT)
+ {
+ /* Wait until NBUSY line goes high */
+ count = 0;
+ do {
+ status = LP_S(minor);
+ count++;
+ } while (LP_READY(minor, status) && (count<LP_CHAR(minor)));
+ }
+ else while(wait) wait--;
+
/* take strobe low */
outb_p(( LP_PSELECP | LP_PINITP ), ( LP_C( minor )));
/* update waittime statistics */
@@ -435,6 +439,12 @@
LP_F(minor) |= LP_CAREFUL;
else
LP_F(minor) &= ~LP_CAREFUL;
+ break;
+ case LPSTRICT:
+ if (arg)
+ LP_F(minor) |= LP_STRICT;
+ else
+ LP_F(minor) &= ~LP_STRICT;
break;
case LPWAIT:
LP_WAIT(minor) = arg;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov