NetBSD Problem Report #52707

From prlw1@cam.ac.uk  Wed Nov  8 15:17:06 2017
Return-Path: <prlw1@cam.ac.uk>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 266257A16A
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  8 Nov 2017 15:17:06 +0000 (UTC)
Message-Id: <20171108151658.GA887@quartz>
Date: Wed, 8 Nov 2017 15:16:58 +0000
From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@NetBSD.org
Subject: uvideo doesn't attach to logitech C910

>Number:         52707
>Category:       kern
>Synopsis:       uvideo doesn't attach to logitech C910
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 08 15:20:00 +0000 2017
>Originator:     Patrick Welche
>Release:        NetBSD 8.99.6
>Organization:
>Environment:
NetBSD-8.99.6/amd64
>Description:
Plugging in a

  Logitech (0x46d) product 0821 (0x821)
  http://support.logitech.com/en_us/product/hd-pro-webcam-c910/specs

uvideo fails to attach with

  uvideo_stream_init: error getting vs interface: INVAL (4)
  uvideo_attach: error initializing stream: INVAL (4)
  uvideo_attach: error: INVAL (4)

as in sys/dev/usb/usbdi.c:usbd_device2interface_handle() line 775

        if (ifaceno >= dev->ud_cdesc->bNumInterface)
                return USBD_INVAL;

at this point

ifaceno = 6  bNumInterface = 4


Guessing: could there be interfaces from the microphone built into the
webcam which confuse the numbering?



uvideo_attach appears to find plenty of interfaces:

uvideo_attach:   non uvc descriptor len=9 type=0x02
uvideo_attach:   non uvc descriptor len=8 type=0x0b
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x00 bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x01 bInterfaceSubClass=0x01 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   non uvc descriptor len=9 type=0x24
uvideo_attach:   non uvc descriptor len=12 type=0x24
uvideo_attach:   non uvc descriptor len=9 type=0x24
uvideo_attach:   non uvc descriptor len=8 type=0x24
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x01 bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x01 bNumEndpoints=0x01 bInterfaceClass=0x01 bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   non uvc descriptor len=7 type=0x24
uvideo_attach:   non uvc descriptor len=11 type=0x24
uvideo_attach:   non uvc descriptor len=9 type=0x05
uvideo_attach:   non uvc descriptor len=7 type=0x25
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x02 bNumEndpoints=0x01 bInterfaceClass=0x01 bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   non uvc descriptor len=7 type=0x24
uvideo_attach:   non uvc descriptor len=11 type=0x24
uvideo_attach:   non uvc descriptor len=9 type=0x05
uvideo_attach:   non uvc descriptor len=7 type=0x25
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x01 bAlternateSetting=0x03 bNumEndpoints=0x01 bInterfaceClass=0x01 bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
...
uvideo_attach: Interface: Len=9 Type=0x04 bInterfaceNumber=0x03 bAlternateSetting=0x00 bNumEndpoints=0x00 bInterfaceClass=0x0e bInterfaceSubClass=0x02 bInterfaceProtocol=0x00 iInterface=0x00
uvideo_attach:   VS Interface Input Header: Len=15 Type=0x24 Subtype=0x01 bNumFormats=2 wTotalLength=2661 bEndpointAddress=129 bmInfo=0 bTerminalLink=3 bStillCaptureMethod=1 bTriggerSupport=0 bTriggerUsage=0 bControlSize=1 00000000
uvideo_attach:   VS Format Uncompressed: Len=27 Type=0x24 Subtype=0x04 bFormatIndex=1 bNumFrameDescriptors=28 32595559-00-10-8000-00AA00389B71 bBitsPerPixel=16 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
uvideo_attach:   VS Frame Uncompressed: Len=54 Type=0x24 Subtype=0x05 bFrameIndex=1 bmCapabilities=0x01 wWidth=640 wHeight=480 dwMinBitRate=24576000 dwMaxBitRate=147456000 dwMaxVideoFrameBufferSize=614400 dwDefaultFrameInterval=333333 bFrameIntervalType=7
...
uvideo_attach:   VS unknown cs interface: len=6 type=0x24 subtype=0x0d
uvideo_attach:   VS MJPEG format: Len=11 Type=0x24 Subtype=0x06 bFormatIndex=2 bNumFrameDescriptors=28 bmFlags=0x01 bDefaultFrameIndex=1 bAspectRatioX=0 bAspectRatioY=0 bmInterlaceFlags=0x00 bCopyProtect=0
...


>How-To-Repeat:
	<code/input/activities to reproduce the problem (multiple lines)>
>Fix:
	<how to correct or work around the problem, if known (multiple lines)>

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.