cups/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch

29 lines
944 B
Diff

From c37d71b1a31d26a4790166e2508822b18934a5c0 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 13 Apr 2021 15:44:14 +0200
Subject: [PATCH] backend/usb-libusb.c: Use 60s timeout for reading at
backchannel
Some older models malfunction if timeout is too short.
---
CHANGES.md | 1 +
backend/usb-libusb.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index d6b0eb423..fbb0d9d89 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
readstatus = libusb_bulk_transfer(g.printer->handle,
g.printer->read_endp,
readbuffer, rbytes,
- &rbytes, 250);
+ &rbytes, 60000);
if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
{
fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);
--
2.26.3