aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/usblp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:39 -0400
commit61a091827e273650b39eb87c799a6d260913fa0b (patch)
tree19f0a4840fc90da6ca3787ee7efacb5bb0c6c7a2 /drivers/usb/class/usblp.c
parent0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (diff)
parentfd8345f8dea93691b0ceba55146088d8c05415f6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits) USB: qcserial: add device id for HP devices USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c USB: allow malformed LANGID descriptors USB: pxa27x_udc: typo fixes and code cleanups USB: gadget: gadget zero uses new suspend/resume hooks USB: gadget: composite device-level suspend/resume hooks USB: r8a66597-hcd: suspend/resume support USB: more u32 conversion after transfer_buffer_length and actual_length USB: Fix cp2101 USB serial device driver termios functions for console use USB: CP2101 New Device ID USB: ipaq: handle 4 endpoint devices USB: S3C: Move usb-control.h to platform include USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue USB: pedantic: spelling correction in comment for ch9.h USB: host: fix sparse warning: Using plain integer as NULL pointer USB: ohci-s3c2410: fix name of bus clock USB: ohci-s3c2410: remove <mach/hardware.h> include USB: serial: rename cp2101 driver to cp210x USB: CP2101 Reduce Error Logging USB: CP2101 Support AN205 baud rates ...
Diffstat (limited to 'drivers/usb/class/usblp.c')
-rw-r--r--drivers/usb/class/usblp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 3f3ee1351930..d2747a49b974 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -880,16 +880,19 @@ static int usblp_wwait(struct usblp *usblp, int nonblock)
880 if (rc <= 0) 880 if (rc <= 0)
881 break; 881 break;
882 882
883 if (usblp->flags & LP_ABORT) { 883 if (schedule_timeout(msecs_to_jiffies(1500)) == 0) {
884 if (schedule_timeout(msecs_to_jiffies(5000)) == 0) { 884 if (usblp->flags & LP_ABORT) {
885 err = usblp_check_status(usblp, err); 885 err = usblp_check_status(usblp, err);
886 if (err == 1) { /* Paper out */ 886 if (err == 1) { /* Paper out */
887 rc = -ENOSPC; 887 rc = -ENOSPC;
888 break; 888 break;
889 } 889 }
890 } else {
891 /* Prod the printer, Gentoo#251237. */
892 mutex_lock(&usblp->mut);
893 usblp_read_status(usblp, usblp->statusbuf);
894 mutex_unlock(&usblp->mut);
890 } 895 }
891 } else {
892 schedule();
893 } 896 }
894 } 897 }
895 set_current_state(TASK_RUNNING); 898 set_current_state(TASK_RUNNING);