* [PATCH] typo in drivers/usb/class/usblp.c (resend)
@ 2004-05-24 10:11 Benoît Dejean
2004-05-24 18:34 ` Randy.Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Benoît Dejean @ 2004-05-24 10:11 UTC (permalink / raw)
To: linux-kernel
i think there's a typo error in usblp.c
patch against 2.6.6
--- linux-2.6.6/drivers/usb/class/usblp.c 2004-04-04
05:36:26.000000000
+0200
+++ linux-2.6.6-modified/drivers/usb/class/usblp.c 2004-05-24
01:15:20.000000000 +0200
@@ -305,7 +305,7 @@
if (~status & LP_PERRORP)
newerr = 3;
- if (status & LP_POUTPA)
+ if (~status & LP_POUTPA)
newerr = 1;
if (~status & LP_PSELECD)
newerr = 2;
--
Benoît Dejean
JID: TazForEver@jabber.org
http://gdesklets.gnomedesktop.org
http://www.paulla.asso.fr
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] typo in drivers/usb/class/usblp.c (resend)
2004-05-24 10:11 [PATCH] typo in drivers/usb/class/usblp.c (resend) Benoît Dejean
@ 2004-05-24 18:34 ` Randy.Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2004-05-24 18:34 UTC (permalink / raw)
To: Benoît Dejean; +Cc: linux-kernel
On Mon, 24 May 2004 12:11:29 +0200 Benoît Dejean wrote:
| i think there's a typo error in usblp.c
|
| patch against 2.6.6
|
| --- linux-2.6.6/drivers/usb/class/usblp.c 2004-04-04
| 05:36:26.000000000
| +0200
| +++ linux-2.6.6-modified/drivers/usb/class/usblp.c 2004-05-24
| 01:15:20.000000000 +0200
| @@ -305,7 +305,7 @@
|
| if (~status & LP_PERRORP)
| newerr = 3;
| - if (status & LP_POUTPA)
| + if (~status & LP_POUTPA)
| newerr = 1;
| if (~status & LP_PSELECD)
| newerr = 2;
| --
Why do you think that there is a typo? Did you check the USB
printer specification?
LP_PERRORP == 0 means Error.
LP_PSELECD == 0 means Not Selected (or means User disabled the printer).
LP_POUTPA == 1 means Paper Empty.
See, LP_POUTPA has different error polarity than the other bits.
I don't see a problem. Are you experiencing some problem with
a USB printer?
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] typo in drivers/usb/class/usblp.c (resend)
[not found] <mailman.1085393760.20566.linux-kernel2news@redhat.com>
@ 2004-05-25 0:23 ` Pete Zaitcev
0 siblings, 0 replies; 3+ messages in thread
From: Pete Zaitcev @ 2004-05-25 0:23 UTC (permalink / raw)
To: Beno_t Dejean; +Cc: linux-kernel
On Mon, 24 May 2004 12:11:29 +0200
> i think there's a typo error in usblp.c
> if (~status & LP_PERRORP)
> newerr = 3;
> - if (status & LP_POUTPA)
> + if (~status & LP_POUTPA)
> newerr = 1;
This is not a typo. Please refer to the USP Printer Class Specification,
chapter 4.2.2 "GET_PORT_STATUS (bRequest = 1)". Bit mask 0x20 consitutes
a one-bit field "Paper Emtpy", with values: 1 = Paper Empty, 0 = Paper
Not Empty.
-- Pete
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-05-25 0:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-24 10:11 [PATCH] typo in drivers/usb/class/usblp.c (resend) Benoît Dejean
2004-05-24 18:34 ` Randy.Dunlap
[not found] <mailman.1085393760.20566.linux-kernel2news@redhat.com>
2004-05-25 0:23 ` Pete Zaitcev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox