Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp177465pxx; Wed, 28 Oct 2020 01:44:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztGc0w4+pLiBgCMgRIp0OPFJaGqi50+EDxGyBhi7ATmdhOu77wf/gqwuYKDhu5z0+V8oXQ X-Received: by 2002:a17:906:c78a:: with SMTP id cw10mr6698687ejb.478.1603874645202; Wed, 28 Oct 2020 01:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603874645; cv=none; d=google.com; s=arc-20160816; b=mBddmS9c4gATH30rmVyQbwZGbQ81uVm5SIae6UGkERi5SxgCfOp4Fs0lBPhpbLMzld ys3XUSY/zIkiZXogDvzIPjMsfbZXNX0p+TmGlD9RQazkZEyigqmjgJQ1j9pdrwCNbolw LTvLEWv2cbF+yfIVK3QV4YpdUFiSYPk84RrMrvYTc2/PSdmulspOv1WWuuI207Fqmpe/ IB1Q03XIN7iPRG+JbgrUWZlFNVVug/y3lwBmOC22d8V+jpUIn0o4Na4+QQ/TtCOH7qas 5HU9Tsn1TMhPZsNz4JpcDRaTtNBnf9ywYQ0maoLfgJReR5YumkSfSFDKncGCvS1iBBxM HrjA== 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=WU7fBZjLTMhL9rR91A8OHeg7wvIOTW6uWXf2Xd3Zzfw=; b=AlNjbohSlRJ4l8RFVJTpc/OqXxhtvGlCvIP2Vjri3tpSldrzGaD1xhzIahofpKJ9Aq TRS5d+cHH3eC1PbDnBlbjmK8ZtcqQki2D52Rd8KJPjN1qMQKraglUECL1HhKRFJAHqoW zWFabdXE+SZeO4RCi4eVgeuSuQPjbx81mDHVTm0kQF0L1v0P52mN8J//ApEYbKfYRBY/ 0P97OoE8UO3LTE0oQXOG8c4IacE3EyiIDCTTtjVl0I7togkw7a2gdme/s++53m7Pt2XO eW9HvI5YiRWTuHHQiZ1c2diHIXMrzRiniiA7ZsYcma9J9qDvAM5iUO2WmZUYJ1Aav8QM hClg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gbZOn0/b"; 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 x26si2664388eds.99.2020.10.28.01.43.43; Wed, 28 Oct 2020 01:44:05 -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="gbZOn0/b"; 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 S1755084AbgJ0OIQ (ORCPT + 99 others); Tue, 27 Oct 2020 10:08:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755072AbgJ0OIO (ORCPT ); Tue, 27 Oct 2020 10:08: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 34E9B206D4; Tue, 27 Oct 2020 14:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603807693; bh=PpIeX+5Ph4pbtnexxRypXDCPdi+ONbZuxlHxVvwX5mk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gbZOn0/bk1KTj1RZseM/WuTX/K9STZ7jl+ozbPxMSmAGrwKDqqKrztm4dIpPZv13i RQWzym+6mYLOyJP2ysoGQcWvsywDI/mTq7glokq0NgviIn6CKrTKcSGQaKPHTfuJsT /mdk/p6vJ9OcIa3revs3B9uoEL7xLfjJgNq6p/L8= 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 4.9 139/139] usb: gadget: f_ncm: allow using NCM in SuperSpeed Plus gadgets. Date: Tue, 27 Oct 2020 14:50:33 +0100 Message-Id: <20201027134908.757650990@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027134902.130312227@linuxfoundation.org> References: <20201027134902.130312227@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 ba8fa97a62cfd..4395ea07c1bb4 100644 --- a/drivers/usb/gadget/function/f_ncm.c +++ b/drivers/usb/gadget/function/f_ncm.c @@ -1548,7 +1548,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