Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1155211pxu; Fri, 27 Nov 2020 00:40:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbG/P2nFYkQJUaUsaneVEMGensqTAtCBHv8VolYG9FzPWqlhLzIWt5N8r1FE8m8a9JabXg X-Received: by 2002:a50:ed84:: with SMTP id h4mr6263455edr.230.1606466415012; Fri, 27 Nov 2020 00:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466415; cv=none; d=google.com; s=arc-20160816; b=GL0B79e5RHpeSCnVbZbePx68WVtbsHo0Ob8I0umCKX/ybNABUv8Ml9q0hvU/PqW0sW GcgGLUmhvHXo5EF6R3Z84bCjmiOa6IDrgggGmzAAYgD3kYyJRhPqSG643tqiwIQjQRuf t+7IEfU4JSQCwiG1Zoc1qcIjhdowUOqg49i3sgqKDghnZXKct661WlckPSEbyXATzqJK XLr7/YG526A7tB1to95BN4K66SWMKDsAuENlL4xCf462ZyxR/ICSrZJ648hbXMjwX4Mc Biwo9aiHESYRPVxFfstUJNSHWhjYkvpaHv7UwAhOpVj1aRT1ROTkXZvfCH96LR5C0cBS BDDA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iRaoLE2Nv/3zZDzc7xxNOsjc9OQHX008zESaLawlQfk=; b=KQDC8XV6tG90/MSAaGfZn7qQ3cy8Hd6qb8dtic3TnWMUZbSRaNikkVPcjZBoEstwZH Oc24Glu7rDiMPWXtB5lhYuJW/nlX8ttWGSij3w7zH17Vj83u9tG2aG08yRGPv6GNvJRQ Ya+sul5rZKmuRLzs0J3THo+RF9Z8E/0Uwh2Q5JPGmC+Deo2EZk23et/pu+ZjErtLdoeO TkrmYEjzs0HsiNajSsZojRYcLS777sFPr7a734cDKRVMUklg1p5jJK9K1ZsvqBmor5LJ MHTIy3dYHq3vhCbtcH4hWVuwqNlAT0DNFh7TeuZo5+F1WPugKs5QSGCbNNwPTML0ODLE 1gMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="JFK4l/IX"; 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 jz19si5435467ejb.699.2020.11.27.00.39.52; Fri, 27 Nov 2020 00:40:15 -0800 (PST) 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="JFK4l/IX"; 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 S2404792AbgKZSJ4 (ORCPT + 99 others); Thu, 26 Nov 2020 13:09:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:55026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404737AbgKZSJz (ORCPT ); Thu, 26 Nov 2020 13:09:55 -0500 Received: from localhost (82-217-20-185.cable.dynamic.v4.ziggo.nl [82.217.20.185]) (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 6310721D7E; Thu, 26 Nov 2020 18:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606414193; bh=vgr4nsH06A3wo/W7zrY8+O1P2aOVbxP/HEId8TSlnU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JFK4l/IXqRAdEBMq94OlHXI7FOz7avnSycZsDpf88lpVAgy7sLWdralqqAyjnZRSA 0vyWuNDi3VLlNirNRnbw2cMk1qiAPgeesKwJVKhUs3Z4MVl8QhaEsN3KNN/ecow5ek t3V1hX0ZE3voXA5YC6yuaCvna3ONLEepKdAcE/Us= From: Greg Kroah-Hartman To: balbi@kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Will McVicker , stable , Greg Kroah-Hartman Subject: [PATCH 4/4] USB: gadget: f_midi: setup SuperSpeed Plus descriptors Date: Thu, 26 Nov 2020 19:09:37 +0100 Message-Id: <20201126180937.255892-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201126180937.255892-1-gregkh@linuxfoundation.org> References: <20201126180937.255892-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will McVicker Needed for SuperSpeed Plus support for f_midi. This allows the gadget to work properly without crashing at SuperSpeed rates. Cc: Felipe Balbi Cc: stable Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_midi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 85cb15734aa8..ceb67651de4f 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -1048,6 +1048,11 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f) f->ss_descriptors = usb_copy_descriptors(midi_function); if (!f->ss_descriptors) goto fail_f_midi; + if (gadget_is_superspeed_plus(c->cdev->gadget)) { + f->ssp_descriptors = usb_copy_descriptors(midi_function); + if (!f->ssp_descriptors) + goto fail_f_midi; + } } kfree(midi_function); -- 2.29.2