1 |
Author: mpagano |
2 |
Date: 2009-05-01 20:19:31 +0000 (Fri, 01 May 2009) |
3 |
New Revision: 1553 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.29/2700_usblp-poll-for-status.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/2.6.29/0000_README |
9 |
Log: |
10 |
usblp patch to poll continuously for the status. |
11 |
|
12 |
Modified: genpatches-2.6/trunk/2.6.29/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/2.6.29/0000_README 2009-04-29 13:39:29 UTC (rev 1552) |
15 |
+++ genpatches-2.6/trunk/2.6.29/0000_README 2009-05-01 20:19:31 UTC (rev 1553) |
16 |
@@ -63,6 +63,10 @@ |
17 |
From: Aneesh Kumar K.V <aneesh.kumar@××××××××××××××.com> |
18 |
Desc: ext4: Fix discard of inode prealloc space with delayed allocation |
19 |
|
20 |
+Patch: 2700_usblp-poll-for-status.patch |
21 |
+From: http://bugs.gentoo.org/show_bug.cgi?id=251237 |
22 |
+Desc: usblp: continuously poll for status |
23 |
+ |
24 |
Patch: 4100_dm-bbr.patch |
25 |
From: EVMS 2.5.2 |
26 |
Desc: Bad block relocation support for LiveCD users |
27 |
|
28 |
Added: genpatches-2.6/trunk/2.6.29/2700_usblp-poll-for-status.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/2.6.29/2700_usblp-poll-for-status.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/2.6.29/2700_usblp-poll-for-status.patch 2009-05-01 20:19:31 UTC (rev 1553) |
32 |
@@ -0,0 +1,51 @@ |
33 |
+From: Pete Zaitcev <zaitcev@××××××.com> |
34 |
+Date: Wed, 7 Jan 2009 00:20:42 +0000 (-0700) |
35 |
+Subject: usblp: continuously poll for status |
36 |
+X-Git-Tag: v2.6.30-rc1~670^2~93 |
37 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dd44be6b17ac52238aa6c7f46b906d9fb76e7052 |
38 |
+ |
39 |
+usblp: continuously poll for status |
40 |
+ |
41 |
+The usblp in 2.6.18 polled for status regardless if we actually needed it. |
42 |
+At some point I dropped it, to save the batteries if nothing else. |
43 |
+As it turned out, printers exist (e.g. Canon BJC-3000) that need prodding |
44 |
+this way or else they stop. This patch restores the old behaviour. |
45 |
+If you want to save battery, don't leave jobs in the print queue. |
46 |
+ |
47 |
+I tested this on my printers by printing and examining usbmon traces |
48 |
+to make sure status is being requested and printers continue to print. |
49 |
+Tuomas Jäntti verified the fix on BJC-3000. |
50 |
+ |
51 |
+Signed-off-by: Pete Zaitcev <zaitcev@××××××.com> |
52 |
+Signed-off-by: Greg Kroah-Hartman <gregkh@××××.de> |
53 |
+--- |
54 |
+ |
55 |
+diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c |
56 |
+index 3f3ee13..d2747a4 100644 |
57 |
+--- a/drivers/usb/class/usblp.c |
58 |
++++ b/drivers/usb/class/usblp.c |
59 |
+@@ -880,16 +880,19 @@ static int usblp_wwait(struct usblp *usblp, int nonblock) |
60 |
+ if (rc <= 0) |
61 |
+ break; |
62 |
+ |
63 |
+- if (usblp->flags & LP_ABORT) { |
64 |
+- if (schedule_timeout(msecs_to_jiffies(5000)) == 0) { |
65 |
++ if (schedule_timeout(msecs_to_jiffies(1500)) == 0) { |
66 |
++ if (usblp->flags & LP_ABORT) { |
67 |
+ err = usblp_check_status(usblp, err); |
68 |
+ if (err == 1) { /* Paper out */ |
69 |
+ rc = -ENOSPC; |
70 |
+ break; |
71 |
+ } |
72 |
++ } else { |
73 |
++ /* Prod the printer, Gentoo#251237. */ |
74 |
++ mutex_lock(&usblp->mut); |
75 |
++ usblp_read_status(usblp, usblp->statusbuf); |
76 |
++ mutex_unlock(&usblp->mut); |
77 |
+ } |
78 |
+- } else { |
79 |
+- schedule(); |
80 |
+ } |
81 |
+ } |
82 |
+ set_current_state(TASK_RUNNING); |
83 |
+ |