Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42705C433F5 for ; Mon, 15 Nov 2021 09:33:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1223461C14 for ; Mon, 15 Nov 2021 09:33:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237669AbhKOJf7 (ORCPT ); Mon, 15 Nov 2021 04:35:59 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:39124 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237647AbhKOJdo (ORCPT ); Mon, 15 Nov 2021 04:33:44 -0500 Received: from pendragon.ideasonboard.com (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1DD6C9CA; Mon, 15 Nov 2021 10:30:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1636968642; bh=1Y+OA3F38HF7erEJaL/qlJd3HqWsJWoq4Q/lKUDdBng=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XJtdkdwXOSwUX/RQ8Uva1/LwhjM5iyvMtuAfIEULSQJzOwvsxoOSoslEWTq0fxI1+ e5W/c5Eg868ynoW1+h0+LG0r9R2UyKexX0Dq46XPO7No6OQymZVyB8xXmfFMS9ufoY hvMNd4z8HkhTdkj1nczAbJiL0GiiXY0T/haJRWOg= Date: Mon, 15 Nov 2021 11:30:20 +0200 From: Laurent Pinchart To: James Hilliard Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Ribalda Subject: Re: [PATCH 1/1] media: uvcvideo: Increase UVC_CTRL_CONTROL_TIMEOUT to 5 seconds. Message-ID: References: <20211114085236.2345589-1-james.hilliard1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211114085236.2345589-1-james.hilliard1@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, Thank you for the patch. On Sun, Nov 14, 2021 at 01:52:36AM -0700, James Hilliard wrote: > Some uvc devices appear to require the maximum allowed USB timeout > for GET_CUR/SET_CUR requests. Could you list the devices that you know about which require this change ? > So lets just bump the UVC control timeout to 5 seconds which is the > same as the usb ctrl get/set defaults: > USB_CTRL_GET_TIMEOUT 5000 > USB_CTRL_SET_TIMEOUT 5000 The USB specification (section 9.2.6.4) requires the device to send the first data packet within 500ms of reception of the request. A 500ms timeout may thus be a bit too short for compliant devices, but 5000ms seems to be a very large margin. I'm wondering if it would make sense to go for a lower value. > Fixes: > Failed to query (GET_CUR) UVC control 11 on unit 2: -110 (exp. 1). > Failed to query (SET_CUR) UVC control 3 on unit 2: -110 (exp. 2). > > Signed-off-by: James Hilliard > --- > drivers/media/usb/uvc/uvcvideo.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h > index fd4f5ef47dfb..583c51ac3eec 100644 > --- a/drivers/media/usb/uvc/uvcvideo.h > +++ b/drivers/media/usb/uvc/uvcvideo.h > @@ -189,7 +189,7 @@ > /* Maximum status buffer size in bytes of interrupt URB. */ > #define UVC_MAX_STATUS_SIZE 16 > > -#define UVC_CTRL_CONTROL_TIMEOUT 500 > +#define UVC_CTRL_CONTROL_TIMEOUT 5000 > #define UVC_CTRL_STREAMING_TIMEOUT 5000 > > /* Maximum allowed number of control mappings per device */ -- Regards, Laurent Pinchart