Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2654369pxj; Mon, 31 May 2021 07:29:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaHAZE7HbqRk3NkBG7EOdj4cGPIjYJJYN4K8mety0XaBq0hcmHpUO5Ed3gPyDUxr26oG3b X-Received: by 2002:a05:6638:76d:: with SMTP id y13mr20375544jad.25.1622471391298; Mon, 31 May 2021 07:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471391; cv=none; d=google.com; s=arc-20160816; b=Yj9JTBf2RHbiDNlV8NL4rTXNB3weJX2Bta37C7A7A1bJNI0XANBapjXF3KGkYBO5qj TlFsKpwHoqY78M6cnsRhjOXVX9Pnf7u3t6SaAdPSOHwVu6meqaAwpjMy4VKF1rydNJ3i ubLoawdDl0/zKND+fL28UrNQAQ3z7r6no6mMLZzL7BcvTxZtipAhrsYOTxHqU4bElBOl 7AQA4PPnyS1NzDzHIy7DT3kmL67WA+LGfk9KIYBpsgqFRyciBWfcu/3OvZXQSurgUsHJ ua5V8CGwUurIcn9wBM7T/Q4aaGgrO3ap5FswI360UcNurMaBePmgwA2Cs0NEtSoFLW/S bkwA== 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=bmwV+rro/WAu1jpOvlecmXOqZ1LPUYNmT8bD6MJKc5c=; b=jDZThklu4c4FLWuFqHxJbDnlbA/UPieXNZDS9nGNbXCBWJwrR5jkK5oW/xR2Pz8jVs 5tkwfeh/Tz6fUsXBd+wGPuZjiezo/wfwTkYEWqvtlN8WOx1/5f2tu2NJWuMPZwtW7hcm 2hxImwTy0Kq4qc9RpdXA/4MHj22ianQsv+Mb0pSgRPj8J0llAVqJT5pQiTGrsQUixrYN TTZS1FlQrSwpeyhNb/FvIdh0JxlecjK5VA89lPXLIL2lXkNPdWfsyg87UAuhj9zxwhOJ 6tWEmv5vlcrX+2gBj1urR2zC0EuHAj3ch9agKmlbIADpdTZv0FUsEaIsrh3uEz4/WMkP RecA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kXuvpk6L; 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 e15si12915307iom.19.2021.05.31.07.29.38; Mon, 31 May 2021 07:29:51 -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=kXuvpk6L; 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 S234087AbhEaOaF (ORCPT + 99 others); Mon, 31 May 2021 10:30:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:55014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232978AbhEaNxP (ORCPT ); Mon, 31 May 2021 09:53:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A242761883; Mon, 31 May 2021 13:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467989; bh=48Soh6RnlXypW8APZSOeTcy38VcdKuzc9LqZpppiBno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXuvpk6LyTgEGKw4mKszrzOZ8piGivugjgXREDaONwisvMQIlmUvHtJqkBnBFrUUO jPdDxKRgCHQJtYqNWFsENhT6+kzLi+fan+a5Aqd/NH/9iXg9UVwnliQmZry01G4jlM Sg0y58/34xw1yAOsy1PmoKp2wgHGtZ2OMcc1HIQc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 5.10 074/252] USB: trancevibrator: fix control-request direction Date: Mon, 31 May 2021 15:12:19 +0200 Message-Id: <20210531130700.514848795@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 746e4acf87bcacf1406e05ef24a0b7139147c63e 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 set-speed request which erroneously used USB_DIR_IN and update the default timeout argument to match (same value). Fixes: 5638e4d92e77 ("USB: add PlayStation 2 Trance Vibrator driver") Cc: stable@vger.kernel.org # 2.6.19 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210521133109.17396-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/trancevibrator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c @@ -61,9 +61,9 @@ static ssize_t speed_store(struct device /* Set speed */ retval = usb_control_msg(tv->udev, usb_sndctrlpipe(tv->udev, 0), 0x01, /* vendor request: set speed */ - USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_OTHER, + USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER, tv->speed, /* speed value */ - 0, NULL, 0, USB_CTRL_GET_TIMEOUT); + 0, NULL, 0, USB_CTRL_SET_TIMEOUT); if (retval) { tv->speed = old; dev_dbg(&tv->udev->dev, "retval = %d\n", retval);