]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The libusb-based USB backend did not unload the kernel usblp module if it was
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Sun, 13 Sep 2015 23:57:07 +0000 (23:57 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Sun, 13 Sep 2015 23:57:07 +0000 (23:57 +0000)
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

CHANGES.txt
backend/usb-libusb.c

index 57c118dcb981df264c3edda67b106f24b0fd0b5f..3b4704688dae1ab2725bbcf9086ef92eb703fba1 100644 (file)
@@ -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)
index 31b856da4b9863502019e6c6039590f0657a96db..93d67bba5665df58c130c960bd2d5b53d1ef7038 100644 (file)
@@ -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);
   }
 
  /*