Commit effb49b4 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[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.
parent b47b914e
......@@ -296,13 +296,13 @@ static int usblp_check_status(struct usblp *usblp, int err)
}
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]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment