Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9238645pxu; Mon, 28 Dec 2020 10:08:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcbEUODfwm3uxwpag35tNyEhOKF+kVhNEp1WF4bZUW1FRz+H+jdVpKBYmahfkVsp9CX9HE X-Received: by 2002:a17:906:eb5b:: with SMTP id mc27mr42160238ejb.163.1609178881606; Mon, 28 Dec 2020 10:08:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609178881; cv=none; d=google.com; s=arc-20160816; b=gnIaNI8Svhx/DUvgLHdBxUnA62UQd7n3Uxd69A00x0mBfEvk33gKa3y+UgJISfKTrt sIW5KzYNhZzMz3ovxG9mA0k0iqGGr05W+Dzp+HpePqykskVxYsV/NpBP/LbAmXvdIvxA YoaZHtOdtMiXclhoE6rZnXv2nZxtdUjKsXgtjpofuuOKdFIAkXWH0XU0JlvjxJ062UTG eItdbGwy0LC010sCNK+XCC2hAbPp8jXEpWhwsA0f7U6O2MheEWWphoLeOKEwVc9kw4gG y9BzCBOldsuDHyCw9Gjaiphv2+p7v/TIvVILvMtWSizS1AB9a98ZFmtPI/3hr6gfockA 0pAA== 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=YaETgTMt/EW+MRLa/rrsjfgPLQwkIA9r/dnLsfMSWkQ=; b=HvYJDxToWACU4G4YFV7W9LTAziayCuuaA3s9PpMUhnNWBleqp/tqTdzhqB+inIBqAS +MroV7OS7uY0T5jqGdVDLlS3/dJ3FfALxjmb4djTMS0Va8vdjkPJ6gMa9A1GF5jOLWlW BjMSkUAzRekyQ0/ppdm9P/s0v9Ipi6KH7nqlc8Yw4E9PXJ+xT33eizQIbRCky4sk+skO TqZTXgF17yMqDvJRp7N/c2jKtgBud9g2JPL9VNLBkYzjJW7VR/yuV3CA2ARm/87MKNbA SnmOhqMVd1Ccc5FRJWbe0HwWVkO137aK/c7uR8AvqR78XO3esCla5uwGkRnlE+ZXet8z SSmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CyvE51GY; 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 l6si19090035ejp.140.2020.12.28.10.07.39; Mon, 28 Dec 2020 10:08:01 -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=CyvE51GY; 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 S2388568AbgL1NXp (ORCPT + 99 others); Mon, 28 Dec 2020 08:23:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:52316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388546AbgL1NXo (ORCPT ); Mon, 28 Dec 2020 08:23:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86EB2208D5; Mon, 28 Dec 2020 13:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161784; bh=VSnBL4f5pgjlnXUot2WMuYZ+6vRGmw+BBFwmPtVlQFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CyvE51GYAiPu8B7BoeTEMCe1sDNRy+Dwj8jvKCK3VSzkHOmLeD6cVIPI1xeW/xxjm QoeNaU7zTMNOcmLFyY0A3mLYw2hn/XS4WTOaXS/DwdcDeZz5WfRmvoJn8T23ApqLSX HQ5zY5bK/l6Bb8XjSZj2kqCQHzXqicHfj75TIzUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felipe Balbi , Will McVicker , Peter Chen Subject: [PATCH 4.19 080/346] USB: gadget: f_midi: setup SuperSpeed Plus descriptors Date: Mon, 28 Dec 2020 13:46:39 +0100 Message-Id: <20201228124923.667893084@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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: Will McVicker commit 457a902ba1a73b7720666b21ca038cd19764db18 upstream. 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 Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20201127140559.381351-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_midi.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -1048,6 +1048,12 @@ static int f_midi_bind(struct usb_config 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);