diff --git a/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch b/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch new file mode 100644 index 0000000..71ccba9 --- /dev/null +++ b/0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch @@ -0,0 +1,28 @@ +From c37d71b1a31d26a4790166e2508822b18934a5c0 Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +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 + diff --git a/cups.spec b/cups.spec index 41c44b5..66fcddc 100644 --- a/cups.spec +++ b/cups.spec @@ -17,7 +17,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.3.3%{OP_VER} -Release: 3%{?dist} +Release: 4%{?dist} License: ASL 2.0 Url: http://www.cups.org/ # Apple stopped uploading the new versions into github, use OpenPrinting fork @@ -61,8 +61,6 @@ Patch11: cups-web-devices-timeout.patch Patch12: cups-failover-backend.patch # add device id for dymo printer Patch13: cups-dymo-deviceid.patch -# add [Job N] in logs -Patch14: cups-logs.patch %if %{lspp} # selinux and audit enablement for CUPS - needs work and CUPS upstream wants @@ -71,6 +69,11 @@ Patch100: cups-lspp.patch %endif #### UPSTREAM PATCHES (starts with 1000) #### +# add [Job N] in logs +Patch14: cups-logs.patch +# 1935318 - old samsung USB devices malfunction with the current +# (250ms) timeout for usb bulk transaction +Patch15: 0001-backend-usb-libusb.c-Use-60s-timeout-for-reading-at-.patch ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal @@ -269,10 +272,13 @@ to CUPS daemon. This solution will substitute printer drivers and raw queues in %patch12 -p1 -b .failover # Added IEEE 1284 Device ID for a Dymo device (bug #747866). %patch13 -p1 -b .dymo-deviceid -# add [Job N] to logs -%patch14 -p1 -b .logs # UPSTREAM PATCHES +# add [Job N] to logs +%patch14 -p1 -b .logs +# 1935318 - old samsung USB devices malfunction with the current +#(250ms) timeout for usb bulk transaction +%patch15 -p1 -b .usb-read-timeout %if %{lspp} @@ -670,6 +676,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man7/ippeveps.7.gz %changelog +* Wed Apr 14 2021 Zdenek Dohnal - 1:2.3.3op2-4 +- 1935318 - old samsung USB devices malfunction with the current (250ms) timeout for usb bulk transaction + * Mon Mar 22 2021 Zdenek Dohnal - 1:2.3.3op2-3 - add [Job N] in logs for better debugging