Bug 5063
Summary: | usb camera failing in 2.6.13-rc6 (usbfs claim device issue) | ||
---|---|---|---|
Product: | Drivers | Reporter: | Con Kolivas (bugzilla) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | REJECTED DOCUMENTED | ||
Severity: | normal | CC: | Dariusz_Brzezinski |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.13-rc6 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 5089 |
Description
Con Kolivas
2005-08-14 03:18:21 UTC
http://bugzilla.kernel.org/show_bug.cgi?id=5063 Summary: usb camera failing in 2.6.13-rc6 It's probably this (cut from -rc6.patch): --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -579,7 +582,7 @@ static int proc_control(struct dev_state if ((i > 0) && ctrl.wLength) { if (usbfs_snoop) { dev_info(&dev->dev, "control read: data "); - for (j = 0; j < ctrl.wLength; ++j) + for (j = 0; j < i; ++j) printk ("%02x ", (unsigned char)(tbuf)[j]); printk("\n"); } @@ -784,16 +790,16 @@ static int proc_setconfig(struct dev_sta for (i = 0; i < actconfig->desc.bNumInterfaces; ++i) { if (usb_interface_claimed(actconfig->interface[i])) { dev_warn (&ps->dev->dev, - "usbfs: interface %d claimed " + "usbfs: interface %d claimed by %s " "while '%s' sets config #%d\n", actconfig->interface[i] ->cur_altsetting ->desc.bInterfaceNumber, + actconfig->interface[i] + ->dev.driver->name, current->comm, u); -#if 0 /* FIXME: enable in 2.6.10 or so */ status = -EBUSY; break; -#endif } } } Waiting for confirmation from Con. Pete is correct. This is a change that has been in the offing for over a year. What this means is that the problem is a bug in the digikam application. The program needs to set the USB configuration _before_ claiming an interface, instead of _after_. This should be brought to the attention of the digikam maintainers. Confirmed, reversing this patch fixes it. > Confirmed, reversing this patch fixes it.
Then the userspace application is broken, and needs to be fixed.
This change to the kernel in 2.6.13 needs libgphoto2 2.1.6 or later to work. Suggest this url as a FAQ for those who have this problem. This first came up in something like March 2004, at which point that "wait till 2.6.10 or so" workaround was put in to give gPhoto2 "more than enough time to deploy the fix to their part of the bug". Clearly, no fix was deployed, even with over a year's advance notice. (The issue has to do with various paths that can self-deadlock code that abuses set_configuration. The kernel fix removed one of the last known paths that could self-deadlock.) |