Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9176630pxu; Mon, 28 Dec 2020 08:29:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx61Rw2luU8hyLco/ONSclPNQD4GWO+FnEkmfWfwBnSfJZqZy2OT/tF3+tex+WCwsmjr24F X-Received: by 2002:a17:907:20b5:: with SMTP id pw21mr43870795ejb.494.1609172953564; Mon, 28 Dec 2020 08:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172953; cv=none; d=google.com; s=arc-20160816; b=JJyvaGC07cZHmknRjGAOYC6+Jl3RwcSV2fI7WiCd2mBN4XMzv8EqVjrhBQRlE9DMW7 SjS906i38o8QITjRPiZS0r5nb0LgzffZ7WwO5xiUSB8slBchpdNfxB+pPLQ554wAhXr4 eP4j6tiTaXH4W+gKQxB+4/i+jtHg/iCxoXYn3jcmisEhyluZwo1ioZ3w/GbHMe9hjvrt jD7eFWyeHZhn6btCWQqOgtlbsUwJdFD+ooChhpjYH659L0gsmX3u3fN2/xOgFcBqxQQm C1jPepwA1UlpYbN2g7ZQRiLjrpeBYmKHmx4DzdE4HbC/numDHWyVUva9DuZ7j1K5wCSa P6BQ== 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=XqSvTHio3cUN2kx30OZQGI0ycIacdzEuxtdfIqLy1+mp5E3e97UCtMhGrj2YUkOpJ/ sKlTdp5GWnRdeEwgIMDGHWOrlLEoUQ+0fVFOohNFe5vhc34Lln/E8bNhjKo83Kqy9kzV zdJJPU58LiFG9ZkwGUWqE0vJH6IlRaYPx5ULFou/u/P+G8+pTYt9X0KGMifQL87rwlUS tXAudOxsEVsp8uwjQb+as/sD50KeGc0FlAwve109yKiSO80O1EGybuGzk9ITxjRC5u4k aiF9JqRfmYQ7aU1DLFgWj19wrkpgk/Kj3EgQJ5BmWkbdr9wy6Uw/gRh4rXPoWuCDjhJp ARfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=08gPXtdu; 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 lz16si17904468ejb.373.2020.12.28.08.28.50; Mon, 28 Dec 2020 08:29:13 -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=08gPXtdu; 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 S1731241AbgL1NJ4 (ORCPT + 99 others); Mon, 28 Dec 2020 08:09:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:37674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731228AbgL1NJx (ORCPT ); Mon, 28 Dec 2020 08:09:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9157D20728; Mon, 28 Dec 2020 13:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160953; bh=VSnBL4f5pgjlnXUot2WMuYZ+6vRGmw+BBFwmPtVlQFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=08gPXtduDAmJGgM0whJ3fvxm0B0JDnTniX6g42Vs13P25iKE+ryFFN49kXKl0E39t PXhCMOK6SOG71o58IbVLIQpIVddDRoVbIFycD/3ae25ZM9Q4VbMeOUDmPgt/thLdzz 5T7rhRLqe+9M0byp9dhGHU9Z7CvZh0HhIqIR+Bbk= 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.14 051/242] USB: gadget: f_midi: setup SuperSpeed Plus descriptors Date: Mon, 28 Dec 2020 13:47:36 +0100 Message-Id: <20201228124907.195840477@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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);