Bug 722255
| Summary: | Problem accessing HP ScanJet 5590 after F14->F15 upgrade | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bob Schultz <bob> |
| Component: | sane-backends | Assignee: | Nils Philippsen <nphilipp> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | nphilipp |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-09-01 16:49:44 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Bob Schultz
2011-07-14 18:36:01 UTC
Update--This does not appear to be a SANE problem. Debugging the sane internals, the attempt to open the properly identified device fails with a BUSY condition. I wrote the following code to report the status in boot-up state, and as shown, it reports a kernel driver active on the device, which precludes a SANE opening:
#include <stdio.h>
#include <libusb.h>
int main(void)
{
libusb_device_handle **dev;
uint16_t vendor_id;
uint16_t product_id;
int r;
vendor_id = 0x03f0;
product_id = 0x1705;
r = libusb_init(NULL);
if (r < 0)
return r;
*dev = libusb_open_device_with_vid_pid(NULL, vendor_id, product_id );
if (*dev == NULL)
return 16;
printf("Opened HP5590 device handle\n");
/*return 0;*/
r = libusb_kernel_driver_active(*dev,0);
printf("Returning kernel probe with code %d\n",r);
/* r = libusb_reset_device(*dev);
libusb_close(*dev);
(This is a commented out fragment which successfully resets the connection
effectively serving as an unplug/re-plug of the device)
*/
libusb_exit(NULL);
printf("Returning with code %d\n",r);
return r;
}
[Bob@localhost resetusb]$ ./listusb-kernel
Opened HP5590 device handle
Returning kernel probe with code 1
Returning with code 1
[Bob@localhost resetusb]$
There appears to be an initialization problem at boot time leaving a kernel driver attached to the device, blocking access by SANE.
Any help in resolving this problem would be appreciated. No such problems occurred in F13 or F14 previously.
Sane fails in sanei_usb.c with errno == EBUSY
/* Claim the interface */
result = usb_claim_interface (devices[devcount].libusb_handle,
devices[devcount].interface_nr);
if (result < 0)
{
SANE_Status status = SANE_STATUS_INVAL;
DBG (1, "sanei_usb_open: libusb complained: %s\n", usb_strerror ());
if (errno == EPERM)
{
DBG (1, "Make sure you run as root or set appropriate "
"permissions\n");
status = SANE_STATUS_ACCESS_DENIED;
}
else if (errno == EBUSY)
{
DBG (1, "Maybe the kernel scanner driver claims the "
"scanner's interface?\n");
status = SANE_STATUS_DEVICE_BUSY;
}
usb_close (devices[devcount].libusb_handle);
return status;
}
Refer to new bug report https://bugzilla.redhat.com/show_bug.cgi?id=723696 specifically addressing the usb port problem. Sorry for chiming in late (was on vacation when you filed this). I'd argue that this is a regression on the kernel side, re your comments in bug #723696. I'll close this bug as a duplicate of it. *** This bug has been marked as a duplicate of bug 723696 *** |