Bug 488949 - Use libusb in the usb backend
Summary: Use libusb in the usb backend
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: cups
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-06 13:00 UTC by Tim Waugh
Modified: 2013-11-15 16:53 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-04 12:40:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CUPS Bugs and Features 3477 0 None None None Never
CUPS Bugs and Features 3696 0 None None None Never
Red Hat Bugzilla 1026909 0 unspecified CLOSED No out-of-paper notification ('usb' backend) 2021-02-22 00:41:40 UTC

Internal Links: 1026909

Description Tim Waugh 2009-03-06 13:00:46 UTC
In CUPS 1.4 the usb backend is capable of using libusb.  We should do that, and make sure that permissions on the USB device nodes are set correctly.  We'll also need to rebuild hal-cups-utils to match.

Comment 1 Bug Zapper 2009-06-09 11:56:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Tim Waugh 2009-07-23 13:10:19 UTC
Care required: we may lose media-empty-error (paper-out) notifications by doing this.

Comment 3 Tim Waugh 2010-10-25 10:45:03 UTC
The relevant code from the kernel driver:

#define LP_PERRORP      0x08  /* unchanged input, active low */
#define LP_POUTPA       0x20  /* unchanged input, active high */
#define LP_PSELECD      0x10  /* unchanged input, active high */

#define USBLP_REQ_GET_STATUS                    0x01
#define usblp_read_status(usblp, status)\
        usblp_ctrl_msg(usblp, USBLP_REQ_GET_STATUS, USB_TYPE_CLASS, USB_DIR_IN,
USB_RECIP_INTERFACE, 0, status, 1)

static const char *usblp_messages[] = { "ok", "out of paper", "off-line", "on
fire" };

... usblp_read_status(usblp, usblp->statusbuf) ...
... status = *usblp->statusbuf; ...

        if (~status & LP_PERRORP)
                newerr = 3;
        if (status & LP_POUTPA)
                newerr = 1;
        if (~status & LP_PSELECD)
                newerr = 2;
...
        if (newerr != err) {
                printk(KERN_INFO "usblp%d: %s\n",
                   usblp->minor, usblp_messages[newerr]);

Comment 4 Jiri Popelka 2013-03-04 12:40:07 UTC
CUPS usb backend has been using libusb1 since 1.5.3 (http://www.cups.org/articles.php?L673)


Note You need to log in before you can comment on or make changes to this bug.