Skip to contentSkip to conversation

usb camera failing in 2.6.13-rc6

DISCUSSION Pete Zaitcev 2 participants 6 messages Aug 14, 2005 – Aug 15, 2005 1 message not in the archive USB

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Con Kolivas

A digital camera which was working fine in 2.6.11/12 now fails on 2.6.13-rc6 (not sure when it started failing).

Does it continue to work on an older kernel? I saw a USB device breaking right in the moment of reboot into a new kernel (thus prompting a week of diffing an head-scratching).

Quoted 1 line

+usbmon: debugs is not available

Deconfigure CONFIG_USB_MON. It's useless without debugfs anyway.

-- Pete

#2 lore raw
Quoted 7 lines · Pete Zaitcev
Quoted 2 lines · Con Kolivas

A digital camera which was working fine in 2.6.11/12 now fails on 2.6.13-rc6 (not sure when it started failing).

Does it continue to work on an older kernel? I saw a USB device breaking right in the moment of reboot into a new kernel (thus prompting a week of diffing an head-scratching).

Yes all those dmesgs etc were redone after it failed in rc6 as I needed it working. Oh and all other usb devices - mouse, printer, scanner, keyboard are working fine in rc6; it's just the camera.

Quoted 3 lines
Quoted 1 line

+usbmon: debugs is not available

Deconfigure CONFIG_USB_MON. It's useless without debugfs anyway.

Will do,

Thanks
Con

#3 lore raw
Quoted 6 lines · Con Kolivas
Quoted 1 line · Pete Zaitcev

On Sun, 14 Aug 2005 17:12:06 +1000, Con Kolivas <[email protected]> wrote:

Yes all those dmesgs etc were redone after it failed in rc6 as I needed it working. Oh and all other usb devices - mouse, printer, scanner, keyboard are working fine in rc6; it's just the camera.

This should be diffable. You caught this regression relatively early. But I'm afraid you have to go through the divide-by-half excercise.

If I were a betting man, I'd bet on this:

drivers/usb/core/devio.c +4 -4
@@ -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
 			}
  		}
  	}

Remember that dmesg diff you sent? That's the one. If you strace the digikamcameracl, it probably keels over after EBUSY.

-- Pete

#4 lore raw
Quoted 9 lines · Pete Zaitcev
Quoted 7 lines · Con Kolivas
Quoted 2 lines · Pete Zaitcev

On Sun, 14 Aug 2005 17:12:06 +1000, Con Kolivas <[email protected]> wrote:

Yes all those dmesgs etc were redone after it failed in rc6 as I needed it working. Oh and all other usb devices - mouse, printer, scanner, keyboard are working fine in rc6; it's just the camera.

Quoted 7 lines

This should be diffable. You caught this regression relatively early. But I'm afraid you have to go through the divide-by-half excercise.

If I were a betting man, I'd bet on this:

Remember that dmesg diff you sent? That's the one. If you strace the digikamcameracl, it probably keels over after EBUSY.

Nice shot! Got it in one. bugzilla updated with confirmation.

So how do we proceed with this one? Do I need to file a digikam bug report too?

Cheers,
Con

#5 lore raw
Quoted 7 lines · Con Kolivas
Quoted 2 lines

Remember that dmesg diff you sent? That's the one. If you strace the digikamcameracl, it probably keels over after EBUSY.

Nice shot! Got it in one. bugzilla updated with confirmation.

So how do we proceed with this one? Do I need to file a digikam bug report too?

Since I never encountered it, I'm not versed in the switching of the current altsetting. I suppose, this has to be discussed between digikam developers and linux-usb-devel (Alan Stern probably knows how that has to be done). It's very likely that all digikam needs is to claim the interface after the altsetting was switched... But I really do not know.

-- Pete

#6 lore raw
Quoted 9 lines · Pete Zaitcev
Quoted 7 lines · Con Kolivas
Quoted 2 lines

Remember that dmesg diff you sent? That's the one. If you strace the digikamcameracl, it probably keels over after EBUSY.

Nice shot! Got it in one. bugzilla updated with confirmation.

So how do we proceed with this one? Do I need to file a digikam bug report too?

Quoted 6 lines

Since I never encountered it, I'm not versed in the switching of the current altsetting. I suppose, this has to be discussed between digikam developers and linux-usb-devel (Alan Stern probably knows how that has to be done). It's very likely that all digikam needs is to claim the interface after the altsetting was switched... But I really do not know.

Ok I've investigated further and had a pointer from Andrew Clayton who fixes this problem with a gphoto2 upgrade. The issue is a libgphoto2 one and kernels 2.6.13+ will require libgphoto2 2.1.6 or later to work properly.

To sort this out before 2.6.13 comes out and it bites a lot of people - as most distros will have this problem - I suggest pointing them to the bugzilla entry as a FAQ:

http://bugzilla.kernel.org/show_bug.cgi?id=5063

Cheers,
Con