Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp665142pxv; Thu, 15 Jul 2021 12:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPj9HMlmFNvp4DjbGrB+KAqf3Qfume98I3Bg0IINlrVs6XH1EZq46QTSPPU3Z0VAp+xgvK X-Received: by 2002:a17:906:615:: with SMTP id s21mr7299088ejb.218.1626378834050; Thu, 15 Jul 2021 12:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378834; cv=none; d=google.com; s=arc-20160816; b=Bctve7tDq0F7YBJwH2+vMfk3YcTQiFuMzyFB4OWQDdEJU9Of+fsVTf/iZlK1ZKbdj8 l6HqeqxFXCqroWEP0PHRHzAvVd+4TsGwPkwMJ0G/OgQHPedhTjIGWwObN7K0UtkgjVj7 /l0o8rEuDMgcQEKuC6DDUuWa7oQQKrMxK1+bQ6FqVfnaE8p3qTlD4bzjZs9/Hoi62Hur VT2+K7nWzegH88HtRO+SCJqrTuUnaRJyCv6lIo0OM0OounshAzPRNXVWRa1ia/ERNli9 nPHkiwMNaU2gsTUu9ZF5jbMXPSLZDnb2Iwg9vfV61OpVmxLY49Tj2Qs83rLHjaHWTwIP DZeQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p6pkmq2o6FcYNxqRG3jIQzqdjJk9XuCTqpw5NDaJ/yU=; b=asRTZI9oZtA+FwHxQWTHsEQbove0eclrJqF7LSd4nKbakzNwgmxQyUkoiXTOWJ3wom v3cv8+opZsTm4MFnFCYJgluj7r4CVUCkeq+k7XTxm2E/i97prgkBkIhsntqNykmuNLwr igGODGAYkH/aTecAU/9ZF0w0OomfvuA2dBfmvs2Q5tha0Fi/FNY+IZyYTJ223aRMSuDK B4tMNuY8jilFj1pJgska5WHu4cNlprdpg0yIMvsm1G0pkj2AOZRcAhrWqIi8uDRV7szI tjZOdbM9BtpOhp2qhGFfOQJwNXR3/ROVFK/U88PoKF5AvAP/Mzl6osd9kMtjSSDbVovq 2rjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XXp8Ekby; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si7973125eju.396.2021.07.15.12.53.30; Thu, 15 Jul 2021 12:53:54 -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=@linuxfoundation.org header.s=korg header.b=XXp8Ekby; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344306AbhGOTtU (ORCPT + 99 others); Thu, 15 Jul 2021 15:49:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244104AbhGOTSL (ORCPT ); Thu, 15 Jul 2021 15:18:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 622436115B; Thu, 15 Jul 2021 19:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376405; bh=yD8e8WJdVZmULPVGiZv1xgiYX5ubqFqt5bbOCI7VAJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XXp8EkbyRyVfk839t7FVYpAPI7IFYcDrsoNEKYsk4/IjXlAuDjuJZxYkDHETuE4/a s7OcuYRmbqisfkg/JTEVb9LQgHQzHxmPFRDwEgCOx7+cQW5zJnVmsofxIvybpt6g4/ C/TK/7eIAu0BN+msClVo2WSZDsiZJygYwNpaISAc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.13 250/266] media: gspca/sq905: fix control-request direction Date: Thu, 15 Jul 2021 20:40:05 +0200 Message-Id: <20210715182652.058248158@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 53ae298fde7adcc4b1432bce2dbdf8dac54dfa72 upstream. The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the USB_REQ_SYNCH_FRAME request which erroneously used usb_sndctrlpipe(). Fixes: 27d35fc3fb06 ("V4L/DVB (10639): gspca - sq905: New subdriver.") Cc: stable@vger.kernel.org # 2.6.30 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/gspca/sq905.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/gspca/sq905.c +++ b/drivers/media/usb/gspca/sq905.c @@ -116,7 +116,7 @@ static int sq905_command(struct gspca_de } ret = usb_control_msg(gspca_dev->dev, - usb_sndctrlpipe(gspca_dev->dev, 0), + usb_rcvctrlpipe(gspca_dev->dev, 0), USB_REQ_SYNCH_FRAME, /* request */ USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, SQ905_PING, 0, gspca_dev->usb_buf, 1,