Received: by 10.223.176.5 with SMTP id f5csp1011008wra; Fri, 2 Feb 2018 09:39:47 -0800 (PST) X-Google-Smtp-Source: AH8x226YkNi1qCt7E5PadxHErdSRtbhHOoNheELv8oHxRoLuMc+hGb0JLssoFBZObckwXIN4M3z1 X-Received: by 10.101.80.204 with SMTP id s12mr15329040pgp.185.1517593187440; Fri, 02 Feb 2018 09:39:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593187; cv=none; d=google.com; s=arc-20160816; b=pDZUXRQ71ShuVc6ENAuaeAcwL3wLQ5IzqlhEBCihAtUUS6S5RAZMEaSwsNJl4NFS8I fEhow4VV4f1JveJg5zhxyiubgXqaUKak7CeGzV8Y4sgG86WDNSt23gSve4n9tLcqQRsa E5cIyFka9MJ4CWPsLrwz0RWMeP2eGBboXwMhAfyRqT+3akxwflVFi63sjxEhdJlpGRPY zRrMVWpCMq34A3D8b62+8dd367HfS4hX/U/n9H4XAQ1/XBzdLUdn3pScpEA2RBPNKiTG q+skevUTc13WhOVjciBaeStGaokIDUN7rrK50stHMcWeY69mP0m7ba9JhuLIDXC07uSF 8nGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZV5s4Mly356puXr0dlF1pI8kbSQ5alYQvHiDgp1QQAc=; b=0nwEKQmk6mRrnq+juSnfUAkKRDGY1Jk9V8fxYt5ucjhR9/fHoBzXL9g0cfzhGybMEt 5s3QwFPnpKg5bg100BKZMCpkIL/6G4U4x8VqRT87oxQ19RX5F+SuZaA30/mVcbHWATn+ UPb3pmxC64sOOsH+Z2zt3YSgTYLYN8PsE9tPa/X/T1O4dqR/5kJr6Ddejz5nE5oC9H3p mMN0MhSbtMfc2TCZLqwi60DybkLKVTvOAlzIA/d/SruvhUb6rs9y/+19w0NbXPM/5e0v 6/2u0Qos/iuustvePOavCjD+yZUrAqEj6j7Cy73V/VwLOobAHHhC+O9a9s8+q1+zy2Z9 lsiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7si2179157pfl.198.2018.02.02.09.39.32; Fri, 02 Feb 2018 09:39:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752633AbeBBRjN (ORCPT + 99 others); Fri, 2 Feb 2018 12:39:13 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40988 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbeBBRQX (ORCPT ); Fri, 2 Feb 2018 12:16:23 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3C111ED5; Fri, 2 Feb 2018 17:16:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Herrenschmidt Subject: [PATCH 4.15 41/55] usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc() Date: Fri, 2 Feb 2018 17:58:59 +0100 Message-Id: <20180202140830.145557205@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140826.117602411@linuxfoundation.org> References: <20180202140826.117602411@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Herrenschmidt commit 11fb37998759c48e4e4c200c974593cbeab25d3e upstream. The current code tries to test for bits that are masked out by usb_endpoint_maxp(). Instead, use the proper accessor to access the new high bandwidth bits. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -912,7 +912,7 @@ int usb_gadget_ep_match_desc(struct usb_ return 0; /* "high bandwidth" works only at high speed */ - if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp(desc) & (3<<11)) + if (!gadget_is_dualspeed(gadget) && usb_endpoint_maxp_mult(desc) > 1) return 0; switch (type) {