From: msweet Date: Tue, 15 Sep 2015 21:16:11 +0000 (+0000) Subject: Some older HP LaserJet printers need a delayed close when printing using the X-Git-Tag: v2.2b1~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f81d652010642fbddfb5a8374aeda3d0df94eae8;p=thirdparty%2Fcups.git Some older HP LaserJet printers need a delayed close when printing using the libusb-based USB backend (STR #4549) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12878 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-2.1.txt b/CHANGES-2.1.txt index ab1574c1f2..701cdeb484 100644 --- a/CHANGES-2.1.txt +++ b/CHANGES-2.1.txt @@ -1,5 +1,17 @@ -CHANGES.txt - 2.1.0 - 2015-08-31 --------------------------------- +CHANGES-2.1.txt +--------------- + +CHANGES IN CUPS V2.1.1 + + - Some older HP LaserJet printers need a delayed close when printing + using the libusb-based USB backend (STR #4549) + - 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) + CHANGES IN CUPS V2.1.0 diff --git a/backend/org.cups.usb-quirks b/backend/org.cups.usb-quirks index 3076a9bd37..c3a74c0a0b 100644 --- a/backend/org.cups.usb-quirks +++ b/backend/org.cups.usb-quirks @@ -5,6 +5,7 @@ # product ID (omit for all vendor products), and a list of known issues: # # blacklist The printer is not functional with the USB backend. +# delay-close Delay close/reset of selected interface # no-reattach Do no re-attach usblp kernel module after printing. # soft-reset Do a soft reset after printing for cleanup. # unidir Only supported unidirectional I/O @@ -227,3 +228,13 @@ # All Intermec devices (STR #4553) 0x067e no-reattach + +# HP LaserJet 1150 (STR #4549) +0x03f0 0x0f17 delay-close + +# HP LaserJet 1300 (STR #4549) +0x03f0 0x1017 delay-close +0x03f0 0x1117 delay-close + +# HP LaserJet 1320 (STR #4549) +0x03f0 0x1d17 delay-close diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c index 93d67bba56..2a70446c80 100644 --- a/backend/usb-libusb.c +++ b/backend/usb-libusb.c @@ -3,7 +3,7 @@ * * LIBUSB interface code for CUPS. * - * Copyright 2007-2014 by Apple Inc. + * Copyright 2007-2015 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -103,6 +103,7 @@ typedef struct usb_globals_s /* Global USB printer information */ #define USB_QUIRK_USB_INIT 0x0010 /* Needs vendor USB init string */ #define USB_QUIRK_VENDOR_CLASS 0x0020 /* Descriptor uses vendor-specific Class or SubClass */ +#define USB_QUIRK_DELAY_CLOSE 0x0040 /* Delay close */ #define USB_QUIRK_WHITELIST 0x0000 /* no quirks */ @@ -641,6 +642,9 @@ print_device(const char *uri, /* I - Device URI */ * Close the connection and input file and general clean up... */ + if (g.printer.quirks & USB_QUIRK_DELAY_CLOSE) + sleep(1); + close_device(g.printer); /* @@ -1211,6 +1215,9 @@ load_quirks(void) if (strstr(line, " blacklist")) quirk->quirks |= USB_QUIRK_BLACKLIST; + if (strstr(line, " delay-close")) + quirk->quirks |= USB_QUIRK_DELAY_CLOSE; + if (strstr(line, " no-reattach")) quirk->quirks |= USB_QUIRK_NO_REATTACH;