FreeBSD Bugzilla – Attachment 126320 Details for
Bug 170076
[lpt] [patch] check readiness with predefined macros
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.35 KB, created by
Arvydas Sidorenko
on 2012-07-22 22:10:10 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Arvydas Sidorenko
Created:
2012-07-22 22:10:10 UTC
Size:
1.35 KB
patch
obsolete
>diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c >index 3a28efd2..8d89323 100644 >--- a/sys/dev/ppbus/lpt.c >+++ b/sys/dev/ppbus/lpt.c >@@ -242,8 +242,7 @@ lpt_port_test(device_t ppbus, u_char data, u_char mask) > do { > DELAY(10); > temp = ppb_rdtr(ppbus) & mask; >- } >- while (temp != data && --timeout); >+ } while (temp != data && --timeout); > lprintf(("out=%x\tin=%x\ttout=%d\n", data, temp, timeout)); > return (temp == data); > } >@@ -564,9 +563,7 @@ lptopen(struct cdev *dev, int flags, int fmt, struct thread *td) > } > > /* is printer online and ready for output */ >- } while ((ppb_rstr(ppbus) & >- (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != >- (LPS_SEL|LPS_NBSY|LPS_NERR)); >+ } while ((ppb_rstr(ppbus) & RDY_MASK) != LP_READY); > > sc->sc_control = LPC_SEL|LPC_NINIT; > if (sc->sc_flags & LP_AUTOLF) >@@ -623,9 +620,7 @@ lptclose(struct cdev *dev, int flags, int fmt, struct thread *td) > > /* if the last write was interrupted, don't complete it */ > if ((!(sc->sc_state & INTERRUPTED)) && (sc->sc_irq & LP_USE_IRQ)) >- while ((ppb_rstr(ppbus) & >- (LPS_SEL|LPS_OUT|LPS_NBSY|LPS_NERR)) != >- (LPS_SEL|LPS_NBSY|LPS_NERR) || sc->sc_xfercnt) >+ while (((ppb_rstr(ppbus) & RDY_MASK) != LP_READY) || sc->sc_xfercnt) > /* wait 1 second, give up if we get a signal */ > if (ppb_sleep(ppbus, lptdev, LPPRI | PCATCH, "lpclose", > hz) != EWOULDBLOCK) >-- >1.7.8.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 170076
: 126320