]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Added USB blacklisting for printers that require a custom backend (STR #4218)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 11 Jan 2013 21:55:58 +0000 (21:55 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 11 Jan 2013 21:55:58 +0000 (21:55 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10808 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.6.txt
backend/usb-libusb.c

index d909cb974efb6fb0a94e297183841f79caa5ba46..380f14937cb7ffbced650bb760fdb457551a6477 100644 (file)
@@ -11,6 +11,8 @@ CHANGES IN CUPS V1.6.2
        - Added a French localization (STR #4247)
        - Added a Russian localization (STR #4228)
        - Updated the Catalan localization (STR #4202)
+       - Added USB blacklisting for printers that require a custom backend
+         (STR #4218)
        - The PPD compiler did not correctly JCL options (STR #4115, STR #4203)
        - The ipptool program now supports DEFINE-MATCH and DEFINE-NO-MATCH
          predicates for STATUS directives.
index 0d472ed259dddac0702465f796506c47c6939b36..3a0fcb89bf3de20f270ba71f2deb0bf8f38bc876 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   LIBUSB interface code for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
+ *   Copyright 2007-2013 by Apple Inc.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Apple Inc. and are protected by Federal copyright
@@ -122,6 +122,7 @@ struct quirk_printer_struct {
 #define USBLP_QUIRK_USB_INIT   0x2     /* needs vendor USB init string */
 #define USBLP_QUIRK_BAD_CLASS  0x4     /* descriptor uses vendor-specific
                                           Class or SubClass */
+#define USBLP_QUICK_BLACKLIST  0x8     /* these printers do not conform to the USB print spec */
 #define USBLP_QUIRK_RESET      0x4000  /* After printing do a reset
                                           for clean-up */
 #define USBLP_QUIRK_NO_REATTACH        0x8000  /* After printing we cannot re-attach
@@ -178,6 +179,35 @@ static const struct quirk_printer_struct quirk_printers[] = {
                                     https://bugs.launchpad.net/bugs/1032456 */
        { 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /* All Zebra devices,
                                     https://bugs.launchpad.net/bugs/1001028 */
+       /* Canon */
+       { 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
+       { 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
+       { 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
+       { 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
+       { 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
+       { 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
+       { 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
+       { 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
+       { 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
+       { 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
+       { 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
+       { 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
+       { 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
+       { 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
+       { 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
+       { 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
+       { 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
+       { 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
+       { 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
+       { 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
+       { 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
+       { 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
+       { 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
+       { 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
+       { 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
+       { 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */
+       { 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */
+        /* MISSING PIDs: CP520, CP530, CP790 */
        { 0, 0 }
 };
 
@@ -889,7 +919,14 @@ find_device(usb_cb_t   cb,         /* I - Callback function */
           !devdesc.idProduct)
        continue;
 
-      printer.quirks   = quirks(devdesc.idVendor, devdesc.idProduct);
+      printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
+
+     /*
+      * Ignore blacklisted printers...
+      */
+
+      if (printer.quirks & USBLP_QUIRK_BLACKLIST)
+        continue;
 
       for (conf = 0; conf < devdesc.bNumConfigurations; conf ++)
       {