Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2714018pxv; Sun, 11 Jul 2021 23:34:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUPvnAC/RB/ivMSpVG4nQhkivt2HkwCBDE8PiKpd+4fcThaRhLHKqDBnvXE3bPIyrWqu5M X-Received: by 2002:a05:6602:1348:: with SMTP id i8mr38780978iov.208.1626071669551; Sun, 11 Jul 2021 23:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626071669; cv=none; d=google.com; s=arc-20160816; b=V+WNkt2vF3YFlr3S3BL3Hu+wM/p7PkH0O8K6sXUnuSC++RCXLGXMrMJq5OhtfvVAmI ysyiV1IsluOLHCBHhhkX3qKfrQuMQIUqzfZgJ90mcenNi+7oYF44GjP3qyDGo98JLpXQ m1YFhdH+jP9jAiQurSKZtst7VwEWTLpoi0I7NYUAhhuhd9gYDeInvSQDanRhCncdDRvc hZO61pt8qPQZdkORMH14F5xsCxiV7KUjsokIMLdP9XgbMEIQP6dQUayz0CME7Pq40Iw9 3Zduedx1Bn2sRPps3sUbHhgRzJxcFbsFCYXPkxZjKgRBxy5EG0M5l5cJ3nS99UkYbObi GqeQ== 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=u8118pXd8zZdGdxt1xF4IzaWcru2Yyy5IA1GM8FLDpM=; b=WI2PHVO1wjF5mM66L+TOugWBRsi3x7qXf4EjrPU+kHHCU+NOt/hx9W4kCh12XVCvoW FJ/ZdnAlF8z3BVu5bIKOfUk3w4gZQGfO3FmS/wLl2Dsm2kNWjy418cp4b1VJOHubWbLU 4ezfyuBti6RKnE9VPARaKpKCU5QdAzatbQNdSVkc1Tjb2jv/o7r7HK8xKDHV0Airxeoi QqtmenbHadKlQ26afTtil1YNghLowuD4naJqr6xYXd8jq1dyAGKhD2JSzSRoOyQ9tfH+ L5ZRVDgFQJCm5WDSOoajxwjmnDFPUVUiYHmzeknvDX62sREVRPSemRJT96nJBKl0Fiz3 P2LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oSNhxQOF; 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 p7si6895844iop.92.2021.07.11.23.34.17; Sun, 11 Jul 2021 23:34:29 -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=oSNhxQOF; 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 S236156AbhGLGfr (ORCPT + 99 others); Mon, 12 Jul 2021 02:35:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235063AbhGLGaz (ORCPT ); Mon, 12 Jul 2021 02:30:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B33326101E; Mon, 12 Jul 2021 06:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626071287; bh=E/hl9tQ8Ht2iK89ka7D2AObl062lU/WuuUpZ92XqVMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oSNhxQOFSHZojkx/FPSdUhsybCCNvB/xK2De31y1YBI3arZRZK3Ff8o+o+NmU8ToD SR5btV/wqJRr5pttP0CajP2mqKZU4aQ579S6mxjpy4AQd9H2AXZye42hmMzTissThA yJu0ouUwAwbbyxk/+e7ZHAH3hI1l4wgcaVCRx7KY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Ulf Hansson Subject: [PATCH 5.4 347/348] mmc: vub3000: fix control-request direction Date: Mon, 12 Jul 2021 08:12:11 +0200 Message-Id: <20210712060750.184330755@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@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 3c0bb3107703d2c58f7a0a7a2060bb57bc120326 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_ROM_WAIT_STATES request which erroneously used usb_rcvctrlpipe(). Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Cc: stable@vger.kernel.org # 3.0 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210521133026.17296-1-johan@kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/vub300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c @@ -2286,7 +2286,7 @@ static int vub300_probe(struct usb_inter if (retval < 0) goto error5; retval = - usb_control_msg(vub300->udev, usb_rcvctrlpipe(vub300->udev, 0), + usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0), SET_ROM_WAIT_STATES, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, firmware_rom_wait_states, 0x0000, NULL, 0, HZ);