ChangeSet 1.1305.7.6, 2003/06/16 12:03:07-07:00, [EMAIL PROTECTED]

[PATCH] USB: handle USB printer error bits independently

Some printers report errors (like out of paper or offline) without
setting the main "I have an error" bit.  I see this on my home
printer and someone else has confirmed it for me, suggesting that
we check the printer error status bits independently, ordering
them as we see fit, so here's a patch that does that.


 drivers/usb/class/usblp.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c Wed Jun 18 11:15:50 2003
+++ b/drivers/usb/class/usblp.c Wed Jun 18 11:15:50 2003
@@ -296,13 +296,13 @@
        }
 
        status = *usblp->statusbuf;
-       if (~status & LP_PERRORP) {
+
+       if (~status & LP_PERRORP)
                newerr = 3;
-               if (status & LP_POUTPA)
-                       newerr = 1;
-               if (~status & LP_PSELECD)
-                       newerr = 2;
-       }
+       if (status & LP_POUTPA)
+               newerr = 1;
+       if (~status & LP_PSELECD)
+               newerr = 2;
 
        if (newerr != err)
                info("usblp%d: %s", usblp->minor, usblp_messages[newerr]);



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to