Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp525111pxf; Wed, 17 Mar 2021 09:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDjDX9YhwHquVajGi6RFPlIOVBVagvUmpu0tWqBhYFnqDYTWV/imdp1n2SbxLqdpo+ChAu X-Received: by 2002:a05:6402:138f:: with SMTP id b15mr42525945edv.121.1615999613369; Wed, 17 Mar 2021 09:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615999613; cv=none; d=google.com; s=arc-20160816; b=LXwHlVgkkrzVoDFEdvurOnPzSp3B97cFtxnURZlqDkaL1tF6HbFHwUEiUgYynYoJIV klVxTN6fMQz9roKPuxsNtD10/u1/6DT0t9Ck5tdbG455Iti18SrAPcyfeL0XT40LhmOJ tJHDTbNDk1GAwTwQK+sSE/0KOV07Di8RCoTJcAmN4jdvyI25JoO/foVC+31efesiWvjc ZMK7ZP69QP85RXkO+vwJvh627Uw4TPwBDEYMJkeHxYAwEidVF+qlNIC00rrzvis1mJTN fXmOwyGL4i0Rx1woFHJlw0l0oXcmSz6j8k8Vpn9VI6+u8vD1QOdwhUmm+x5i/6K/q6Ge qUnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x7BfbRkZgKvyDVm8Db9Jrgj8gcrrUGA9hBYKQf9MVsw=; b=z5j9uNGAPrxBZS6TKoU4/GN/mwRyFwz2XlL8sn5Mxn4BeH8awzUN/mxtQLkkFZLYkI N2BGYyIaEVYmc9DHD5SxrrNk5rdvVKzi0c3lw7SPgz7wLeJFXmOgsqCmswn8FGehMlUd RWId0cRRhIihYPvH8bg0VY5Po7KpoWo8rLflZdOXh3QJDc4DzvjBxxjufhWjYWQzepfJ oH9tI0RbtlDsVhJnYh1/diCiCaZ+LJemfsIg0bT/Syydf6DBaahU9ZMUSS31dHmNoxpj 5A/7zV9oQciZW7/wGJODVdzzFpxNkUf6iKMlKa7phyQU8x7rmUDBUXTq7VW9iZe01RdP NPIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AX65wNOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si16703505edp.277.2021.03.17.09.46.29; Wed, 17 Mar 2021 09:46:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AX65wNOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232767AbhCQQpn (ORCPT + 99 others); Wed, 17 Mar 2021 12:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232653AbhCQQpU (ORCPT ); Wed, 17 Mar 2021 12:45:20 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C984C061762 for ; Wed, 17 Mar 2021 09:45:20 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id dx17so3702138ejb.2 for ; Wed, 17 Mar 2021 09:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x7BfbRkZgKvyDVm8Db9Jrgj8gcrrUGA9hBYKQf9MVsw=; b=AX65wNOoec086wfSe4poCGNVBOMmtrxUvp4lnsBJtWvPfIBdxMs8nmdWM8TZFMTJ+Y xEFco9JGe4jam6eQIdqCKyorT/8kOjyjvD0lyes7Jo23y10W6jF4N70bxCKNLY1WE0Mr j7taWweCbRqpmBUzjY7kIa8kMLZL90d8APBCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x7BfbRkZgKvyDVm8Db9Jrgj8gcrrUGA9hBYKQf9MVsw=; b=e2/Nr4ajSvle118COlA3BqN/hwdWsNJ71IynNPM4puyYuQjReTez9sVFyyM24iRNEL UaJ1eVKsvSWvdYUoEXK9pxSdQwM0xM/ORLYDy+Br628IJ04UnVtyc1eL88pZH5aDuB3R 7L4mVpYS0dhX3p9JBXCbUAzhdQDR11zsoayIUUK/JMJEkfCgYkx5Z15X+AUfpAcDrax3 dRuBlXqlcXefMRayEfopyYhUsc25Nd2sLVXQ+6/DoVnt2t4OerRWDEBR35Tsc6pSbv6K 6lv9DHeUf0YVAvbFwPuxZhz7R3uP+SM7lDa/KKYfduK47GsgiSCKCWULCW5EkRln24vs k5Fg== X-Gm-Message-State: AOAM531UnKJPpIcILw3Zj1dT6Q+Rb4iukeBI3KINe1cnMA0bnNpBZZK1 Q1Ng2RfcYWZiobXpPLTzjvsbKQ== X-Received: by 2002:a17:906:75a:: with SMTP id z26mr36257622ejb.22.1615999518922; Wed, 17 Mar 2021 09:45:18 -0700 (PDT) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id hy25sm12088128ejc.119.2021.03.17.09.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 09:45:18 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Sergey Senozhatsky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org Cc: Ricardo Ribalda Subject: [PATCH v6 08/17] media: uvcvideo: Return -EIO for control errors Date: Wed, 17 Mar 2021 17:45:02 +0100 Message-Id: <20210317164511.39967-9-ribalda@chromium.org> X-Mailer: git-send-email 2.31.0.rc2.261.g7f71774620-goog In-Reply-To: <20210317164511.39967-1-ribalda@chromium.org> References: <20210317164511.39967-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The device is doing something unspected with the control. Either because the protocol is not properly implemented or there has been a HW error. Fixes v4l2-compliance: Control ioctls (Input 0): fail: v4l2-test-controls.cpp(448): s_ctrl returned an error (22) test VIDIOC_G/S_CTRL: FAIL fail: v4l2-test-controls.cpp(698): s_ext_ctrls returned an error (22) test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_video.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index f2f565281e63..25fd8aa23529 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -112,6 +112,11 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit, case 5: /* Invalid unit */ case 6: /* Invalid control */ case 7: /* Invalid Request */ + /* + * The firmware has not properly implemented + * the control or there has been a HW error. + */ + return -EIO; case 8: /* Invalid value within range */ return -EINVAL; default: /* reserved or unknown */ -- 2.31.0.rc2.261.g7f71774620-goog