Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2624728pxj; Mon, 31 May 2021 06:50:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/9kNS0WytjyiVmGBkeZvrzY3LcyrG3QBcjFeeRtbUf6ennXpDCr+IKRX0VhDyv49j0QiX X-Received: by 2002:a17:906:2ec6:: with SMTP id s6mr22637457eji.65.1622469048112; Mon, 31 May 2021 06:50:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622469048; cv=none; d=google.com; s=arc-20160816; b=qEBig7rE51RX9bPHmSLpfVxeDsF+l/IShIWGNJaQhlHZnNidpcj4kGeMPBW2m0BljV iWS+qXtxrheVp2An35i0oGVQmgJOz8VD0miZ4fkeaiisqzTq8cuuBu/b7iDqQMDbIsPw Azk1n5CQIpNNSD1+vat8LTAbe/MWtRPVwdISwFtxh6TtN6MDuBqcJD8uMh4wIRXAVKWI xsfrSWSpV8H/DmAubOtSU/tSwOaA1/xOPiUIim+bXe47KVeiDs+IBqWME0ECrFLBpqvR ZkZF1DT07Lse+Iv3/c7lW31BoL8bU+TW9X2E4IGtB4XvzztjUppPwpi4EoPen6B5WGnP XYmQ== 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=uOnvqU0WCd6xuGF0TH0LgcFAT7sKg1hcU+63qIiuve0=; b=DuGeOjyDp5owyNyW46Qz38hU1pvT+dLF3nGhT9DDbU1U5wnr3rpPVEUynjZjMSRkZn QVdWpjHWaJkMRs5Uzy49KdJPYA+E7r6pFP73e8I27QyZiN7aoESOdeQMqp9x85UPnqOi U8TlzgV1nvnJGB62WTLSwNuR79+t1/IEEoIniV17Zd8soMJVtyWB6XyQomsDAVTKtp9Q /AEPZDW4aTbhTko8Lbvup6U9YAqieT0h6dcTAo0LrNaqIL/ls0e+sutlhamKAiXchHX6 I5AD7T/EJuSzsJfwuaMMiT9y8nWu/0wkOqnRCJG44ZvKiOFTu8/I72pPEPYRRaE4iBWl 3VxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iM6wzOQ6; 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 go15si3110683ejc.608.2021.05.31.06.50.25; Mon, 31 May 2021 06:50:48 -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=iM6wzOQ6; 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 S230289AbhEaNsK (ORCPT + 99 others); Mon, 31 May 2021 09:48:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:39080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232114AbhEaNdU (ORCPT ); Mon, 31 May 2021 09:33:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 677B6613F0; Mon, 31 May 2021 13:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467462; bh=wLTcEg0Z9vVBFyBZ+RfAbUKqhMeJpZDMSjpBxZ40i/Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iM6wzOQ6QfWJCXz0PEQha9491SJNo7nLDT9smu1/dCban0g9EOqlBYoN3mQ9mE1LX J97VVE4R5aigIwdUVqHtvNFweVUkfse9n6eTvGqZiPzRtm9Z2jqdadwzxrxx7NDUHS dZTwU0kwHayrU3JTAJCPIm3ORwQPmKY1+jpcKAVY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.19 029/116] USB: trancevibrator: fix control-request direction Date: Mon, 31 May 2021 15:13:25 +0200 Message-Id: <20210531130641.153387826@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130640.131924542@linuxfoundation.org> References: <20210531130640.131924542@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 @@ -59,9 +59,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);