Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133474
b: refs/heads/master
c: dd44be6
h: refs/heads/master
v: v3
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent e3f493d commit acfbaa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c16034d73da2c1b663aa25dedadbc533b3d811c
refs/heads/master: dd44be6b17ac52238aa6c7f46b906d9fb76e7052
11 changes: 7 additions & 4 deletions trunk/drivers/usb/class/usblp.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,16 +880,19 @@ static int usblp_wwait(struct usblp *usblp, int nonblock)
if (rc <= 0)
break;

if (usblp->flags & LP_ABORT) {
if (schedule_timeout(msecs_to_jiffies(5000)) == 0) {
if (schedule_timeout(msecs_to_jiffies(1500)) == 0) {
if (usblp->flags & LP_ABORT) {
err = usblp_check_status(usblp, err);
if (err == 1) { /* Paper out */
rc = -ENOSPC;
break;
}
} else {
/* Prod the printer, Gentoo#251237. */
mutex_lock(&usblp->mut);
usblp_read_status(usblp, usblp->statusbuf);
mutex_unlock(&usblp->mut);
}
} else {
schedule();
}
}
set_current_state(TASK_RUNNING);
Expand Down

0 comments on commit acfbaa2

Please sign in to comment.