From: Tim Waugh <twaugh@redhat.com>
To: "printing-architecture@lists.linux-foundation.org"
<printing-architecture@lists.linux-foundation.org>
Subject: [Printing-architecture] [patch] CUPS 1.7.0: fix corrupted output for USB printers
Date: Fri, 29 Nov 2013 12:08:25 +0000 [thread overview]
Message-ID: <1385726905.2659.6.camel@rubik> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 809 bytes --]
When using the usb backend, if a usb-1 printer connected to a usb-2 hub
runs out of paper during the job the print output will be corrupted.
https://bugzilla.redhat.com/show_bug.cgi?id=1026914
This is due to using a 60 second timeout for the libusb_bulk_transfer()
call. Timeout handling and retries are not reliable in every case, as
described here:
https://bugzilla.redhat.com/show_bug.cgi?id=1035863
Quoting from that report:
==>
So TL;DR: this a known and unfixable problem, and the solution is to
simply not cancel transfers (by setting a timeout) and then decide you
want to finish the transfer after all. Either decide you want to really
cancel the transfer, or just wait for it to finish normally.
<==
Patch attached to change the timeout to 0 to wait indefinitely.
Tim.
*/
[-- Attachment #1.2: cups-usb-timeout.patch --]
[-- Type: text/x-patch, Size: 1107 bytes --]
diff -up cups-1.7.0/backend/usb-libusb.c.usb-timeout cups-1.7.0/backend/usb-libusb.c
--- cups-1.7.0/backend/usb-libusb.c.usb-timeout 2013-07-17 16:51:43.000000000 +0100
+++ cups-1.7.0/backend/usb-libusb.c 2013-11-28 16:44:03.785124015 +0000
@@ -496,7 +496,7 @@ print_device(const char *uri, /* I - De
iostatus = libusb_bulk_transfer(g.printer->handle,
g.printer->write_endp,
print_buffer, g.print_bytes,
- &bytes, 60000);
+ &bytes, 0);
/*
* Ignore timeout errors, but retain the number of bytes written to
* avoid sending duplicate data...
@@ -519,7 +519,7 @@ print_device(const char *uri, /* I - De
iostatus = libusb_bulk_transfer(g.printer->handle,
g.printer->write_endp,
print_buffer, g.print_bytes,
- &bytes, 60000);
+ &bytes, 0);
}
/*
@@ -534,7 +534,7 @@ print_device(const char *uri, /* I - De
iostatus = libusb_bulk_transfer(g.printer->handle,
g.printer->write_endp,
print_buffer, g.print_bytes,
- &bytes, 60000);
+ &bytes, 0);
}
if (iostatus)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 482 bytes --]
next reply other threads:[~2013-11-29 12:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 12:08 Tim Waugh [this message]
2013-12-02 16:33 ` [Printing-architecture] [patch] CUPS 1.7.0: fix corrupted output for USB printers Michael Sweet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385726905.2659.6.camel@rubik \
--to=twaugh@redhat.com \
--cc=printing-architecture@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.