Bug 488949 - Use libusb in the usb backend
Use libusb in the usb backend
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: cups (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-06 08:00 EST by Tim Waugh
Modified: 2013-11-15 11:53 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-04 07:40:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 3477 None None None Never
CUPS Bugs and Features 3696 None None None Never

  None (edit)
Description Tim Waugh 2009-03-06 08:00:46 EST
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 07:56:53 EDT
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 09:10:19 EDT
Care required: we may lose media-empty-error (paper-out) notifications by doing this.
Comment 3 Tim Waugh 2010-10-25 06:45:03 EDT
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 07:40:07 EST
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.