Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9184522pxu; Mon, 28 Dec 2020 08:41:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9c0AJI+g6JfXfzw/hCRx3iwswHEnecYfLjjEetFURBlnAl8OAtup+2YUCcEcOMjnhTSB5 X-Received: by 2002:a17:906:378f:: with SMTP id n15mr41525589ejc.263.1609173699966; Mon, 28 Dec 2020 08:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173699; cv=none; d=google.com; s=arc-20160816; b=IoQcKif0y0Zf2baxCy7HeaZ0cKpp6MdTKiEQc6yD6D0+3d+/egkWiiNjmqD67t+JXP PxshoXnBvwahn3kcT26gLK3/BvMp9yzTjsFBg6LTHbsSkyLBP/y/UMzR6vc1zZjpH3g3 fxQfY50RsNvpPYbF98mEiggy/5Irk3CjkO3MGPQLSBDUsgKiS65VWzzRIAbgI/k4Q3LL uofLnu18sEIceApY0c/1ncq4w95QFd5uvIVSPJ2eS5TVxJr/HwcUESbCjmHzFFRB4iVZ qeKyUa6OR+79QfZwImLWJgCFstbiUQp/f1ZJ6TwXKoVEW0SJo67IE0xNYDjIyTlmIWTZ 6zqg== 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=vWSTyLCti8IoWAm1D/D0z6stg+MMndzAXUpsmIBBhTo=; b=WW+Xm4qGgTxY+zt7SETetLJ/0vTGz6iOCFcIhv4joILKUjc7rmNZ8YTMHfehd6Unfn T98c9h27ioM36Hw6qm/JY206vZaVbkPAmbZdD365OjXLJdGHcVBX3pYMuoGdc/53VQOQ SJzwci9/QtCC7wuBWAXci9vrpO48KiwCMUhN1QM5tRrRVBJ4PAZ2T+JSCh5TxvFLp1K1 DGfIQbeTgZI+h4HjtbKzRdguE4yT3E8gKqx5sK48qbOjOcuiWO/KfV0m1rz7kSVtBbwW zayoBo3mLxkxy+TXbbeV5OjOAGwtQeRXnQTHZoLfnaDVBg780Awi3i4nnfnYSQQFcFrn KRYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aqL7HrUg; 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 t21si25440065edi.2.2020.12.28.08.41.16; Mon, 28 Dec 2020 08:41:39 -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=aqL7HrUg; 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 S2633794AbgL1QjZ (ORCPT + 99 others); Mon, 28 Dec 2020 11:39:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:56074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729424AbgL1NAM (ORCPT ); Mon, 28 Dec 2020 08:00:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB42722573; Mon, 28 Dec 2020 12:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160397; bh=DE3cR/WXTTulpqmIcWjEFEhHP2EW4aJJyfdFm0vLJWE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aqL7HrUgc84vjW84d5QolGQ7rsuxnvpX2TsBV4AmJYd3HdZxPMrgz4UdssYO5zzsl W7qeTruG+dKrRywnBmbXIUbK+abVFsQeEHJAZfLLq15A6qWeoL6Gy4E+1R//odrqmp CMzny94APNqzqM1LQbWQ+H3bXxjG0jDi7qUavSyU= 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.9 038/175] USB: gadget: f_midi: setup SuperSpeed Plus descriptors Date: Mon, 28 Dec 2020 13:48:11 +0100 Message-Id: <20201228124855.092762987@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 @@ -1008,6 +1008,12 @@ static int f_midi_bind(struct usb_config f->hs_descriptors = usb_copy_descriptors(midi_function); if (!f->hs_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);