Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp303149pxx; Wed, 28 Oct 2020 05:26:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRCnRVbosp0rGXD8A4lmr9ln8CH3V1tcJYGSkl/x4RgkETXAAR98Ji2V7KUrWtc/MPLRil X-Received: by 2002:aa7:ce96:: with SMTP id y22mr7505988edv.181.1603887989585; Wed, 28 Oct 2020 05:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603887989; cv=none; d=google.com; s=arc-20160816; b=o5sey+LaZN5RbvV1zfcKShvRdQyMPV49p++JGJT+bpEfAlDvIXK7w86r8+sDJff2CW HFYyhfNl8vtsguQz5H/a+stVVzbGjVr/YFGKi5S1flf83LXpmMTaTLfY00a4npPKMDOm yTsbbK4vk/MBUE4DQL5q4zla0TuksBKx/gutN7Mtz37nC3RkVkRwxX88HZLdsWeSbRe9 T/OjfyfpMyQecxyc2XQaKhgZ1amXrImpzIvgG8tNPS/skzIGkgjWwgGUarDgGKqohA5u WfzntIuslnpuZ14cyN/8Y3XANXQRQm/U87Z1STHcY/p1tHyljTKqcD2UIsBr5F7qARrV /+Cg== 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=nNspTP+IQZPybteN4nkKrnld2T7QCm2yk8xahXXlMBE=; b=oqlGJvp8wfIbkIX8sO7TD3q+UgfB9bDKOyJTg+oKqLNE3HstUFNt1mULR68YXV1884 4Xt/5Tfje1xWjCI2zFbBW7XrZ6RbRYFM8ishMzCKtYCCNokikNNoNPhABE+f3IDQnjTM ngV5K8tbMeoC4aao0rttmzrGQndwaekPlwv9wrzwAsr8Iwrm1g2klDYIU6NSvmdt4PuO sAykbaX2iYvs68fkx++rNhs9m/lP56QM8f5XwXQ8HUxwYo6eEMgiUeE+MEXR+W9DjXL2 A0SoCGKqGMAH27M/SHzYMi1Pn7CdyNKfHebQCNZKXN6ZJhTEaVWcDBKFaHJDcGSPs6SQ CJnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=F+AWv7lb; 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=fail (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 d4si2698178edr.173.2020.10.28.05.26.07; Wed, 28 Oct 2020 05:26: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=@kernel.org header.s=default header.b=F+AWv7lb; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1796886AbgJ0PU1 (ORCPT + 99 others); Tue, 27 Oct 2020 11:20:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:54536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796301AbgJ0PRO (ORCPT ); Tue, 27 Oct 2020 11:17:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4748F2225C; Tue, 27 Oct 2020 15:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811832; bh=Tvu2p9Pi8z1YiEfClLPGGISIx6HNTdHeQPv//3cQMlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F+AWv7lbJ6LfAOVdzswxbIAXkzSnCJZGIEzCWK4QmAUIwIjYsxjTZDwUGp+vvljAW JzAZerngEb5lYoMckDyDX/yG0BIahpekpAPWQ9haL1DD3PB+hshvszOFjwCBZ1VyLI r9y/ISSOGe0uVacZd2tXxrjdSRq+7bRlwOm+spHc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Maciej=20=C5=BBenczykowski?= , Lorenzo Colitti , Felipe Balbi , Sasha Levin Subject: [PATCH 5.8 633/633] usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets. Date: Tue, 27 Oct 2020 14:56:16 +0100 Message-Id: <20201027135552.515673673@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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: Lorenzo Colitti [ Upstream commit 7974ecd7d3c0f42a98566f281e44ea8573a2ad88 ] Currently, enabling f_ncm at SuperSpeed Plus speeds results in an oops in config_ep_by_speed because ncm_set_alt passes in NULL ssp_descriptors. Fix this by re-using the SuperSpeed descriptors. This is safe because usb_assign_descriptors calls usb_copy_descriptors. Tested: enabled f_ncm on a dwc3 gadget and 10Gbps link, ran iperf Reviewed-by: Maciej Żenczykowski Signed-off-by: Lorenzo Colitti Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/gadget/function/f_ncm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c index 7672fa25085b0..92a7c3a839454 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -1536,7 +1536,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f) fs_ncm_notify_desc.bEndpointAddress; status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function, - ncm_ss_function, NULL); + ncm_ss_function, ncm_ss_function); if (status) goto fail; -- 2.25.1