Commit 633a738a authored by Till Kamppeter's avatar Till Kamppeter

The libusb-based USB backend sometimes did not unload the kernel usblp module if…

The libusb-based USB backend sometimes did not unload the kernel usblp module if it was preventing the backend from accessing the printer causing an infinite loop taking 100% CPU (CUPS STR #4707).
parent 33db6d87
# patches accepted and committed upstream
usb-backend-fix-infinite-loop-when-usblp-module-attached.patch
# patches sent upstream
pwg-raster-attributes.patch
......
Description: The libusb-based USB backend sometimes did not unload the kernel
usblp module if it was preventing the backend from accessing the printer
causing an infinite loop taking 100% CPU.
Author: Till Kamppeter <till.kamppeter@gmail.com>
Bug-Upstream: https://www.cups.org/str.php?L4707
Last-Update: 2015-09-13
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1522,6 +1522,16 @@
goto error;
}
+ else if ((errcode = libusb_detach_kernel_driver(printer->handle, printer->iface)) < 0)
+ {
+ fprintf(stderr,
+ "DEBUG: Failed to detach \"usblp\" module from %04x:%04x\n",
+ devdesc.idVendor, devdesc.idProduct);
+
+ goto error;
+ }
+
+ sleep (1);
}
/*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment