From: msweet Date: Sun, 13 Sep 2015 23:57:07 +0000 (+0000) Subject: The libusb-based USB backend did not unload the kernel usblp module if it was X-Git-Tag: v2.2b1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7385c337aceb5cb88ad2cb5bac754f87ab5c269b;p=thirdparty%2Fcups.git The libusb-based USB backend did not unload the kernel usblp module if it was preventing the backend from accessing the printer (STR #4707) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12869 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES.txt b/CHANGES.txt index 57c118dcb9..3b4704688d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,9 @@ CHANGES.txt - 2.1.1 - 2015-09-13 CHANGES IN CUPS V2.1.1 + - The libusb-based USB backend did not unload the kernel usblp module + if it was preventing the backend from accessing the printer + (STR #4707) - Current Primera printers were incorrectly reported as Fargo printers (STR #4708) - Updated localizations (STR #4709) diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 31b856da4b..93d67bba56 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -1522,6 +1522,16 @@ open_device(usb_printer_t *printer, /* I - Printer */ 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); } /*