Received: by 10.223.176.5 with SMTP id f5csp983414wra; Fri, 2 Feb 2018 09:14:22 -0800 (PST) X-Google-Smtp-Source: AH8x2246D/JwPabHUMfx1lVaA1xfd81wTFxk9A6U8Jel04SFyBISmDNT7i3C73rKnid3pfyiLX07 X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr35612991plo.72.1517591662415; Fri, 02 Feb 2018 09:14:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517591662; cv=none; d=google.com; s=arc-20160816; b=AnKcsgSjB+i5xpuUFsfiuhWVq53AAFM8gy7fRQu+3Scn4evT1ZuoiwonyRkXCDEp9s pO0nWMLmWKdaW31CCfTr0JSxNchXo31SVfrvuTqwj+wR6CAJQcsWip1v8jD6EopeMb+v 1oq5Fs3HYVEUl8SIaoBI4oVUEfImjsl5DtcepiXGeyEntimz2eybCB8WiAbFb9bgK9xZ BCp37Po2gps3o83KF+XaSrxkIbojFK9UQDgVWmjZ8HpsxDC6Tzib1dl6yRkcxXS+k7Nn yg1dQ2InA5LMrrGOD1kqrL7k9kjvJDzNgM6BUSMUkW0gOobCeWHxyGl2T/IBA9pGjt7x zwCg== 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=av5Ag3CFkzBS82Ty9hHriCzBRDBrB5NllK6bZ5LEqYw=; b=I9ouYMUvN2r5jc1tlYt6Y8GFEy5saYuUrk2pOiZA0nQpetMgS7n+9LOAj4i2MT56ua u7oh6ECJxo1nz+arEH8bVF1u3uZ6Y6EYao2zFn49/h6kcn7srqFg9qJa1xF/kKrCu8j6 vHZzf9y6CKIapFFFVfqthDOH3j9mop1MHQgyE7MngvaQvdWmH5Ckbfe9+pn0dY22KT2b uixVcERtMMKqJ0SNMr/27qgP81Z/0q1xgz8uXcSTo5/9gmx2Br5f3/FIQG0lNFtWNgEg jC1AYNwge1gNQUsEWKxl+HSz/nPp5Shjp1ULcbuRIDBwxzwGngOrPJafIZOuKYJQxsLY tQnA== 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 f6si1702745pgn.336.2018.02.02.09.14.07; Fri, 02 Feb 2018 09:14:22 -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 S1753509AbeBBRNO (ORCPT + 99 others); Fri, 2 Feb 2018 12:13:14 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36922 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752945AbeBBRHF (ORCPT ); Fri, 2 Feb 2018 12:07:05 -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 55723EC6; Fri, 2 Feb 2018 17:07:04 +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.9 83/86] usb/gadget: Fix "high bandwidth" check in usb_gadget_ep_match_desc() Date: Fri, 2 Feb 2018 17:58:43 +0100 Message-Id: <20180202140830.262018063@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140822.679101338@linuxfoundation.org> References: <20180202140822.679101338@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.9-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 @@ -913,7 +913,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) {