Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1384755pxu; Fri, 27 Nov 2020 06:11:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOf1zdvB5IbmNr/W8u9O2N/CvTkSygv4cqZqIcZ/4NWMoCsNG8E+r0y3mY/o+QFtk7KsW8 X-Received: by 2002:a17:906:52da:: with SMTP id w26mr7849193ejn.347.1606486318314; Fri, 27 Nov 2020 06:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606486318; cv=none; d=google.com; s=arc-20160816; b=b004QU8i4Riovsoo0lgwZsCEoAIZSgzrUZnnUePWkBb+o9a53VAnsyQvGRfBQgL2f/ 3pGHPLz0mbC15nNvlBUF0fFmseKiha/a3825IyhfAepvQtGLo0/TGokjSNHDQ4608/im 2m3UMGNkIk+qOoNaKKNYOpu8tV/vOuCUei4LTucJFDUYRw94kgllmboJvThokhpbyGoc PBJ2vuuV5a2edRkF2yl011/vjrHp30cYHLigWtiRAn09mpM+YW4Fkl6ZX2Xc7ecC9AgQ ncfjjpG4ogNa/hmMkT+ANe98+r6AQjmXRMIc9AdbFeEwEIHKUqCP2JjAToPQq7x7ckFM xNpQ== 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=HqAi91xFlSHQvdxK3fGreBX1rSX5/hLitZFfRNGk4bQ=; b=UGszaSepLGv3mH8BhjxCikAPBZuljZVX4rcpFa8Qtxt1Zv/6cig671zL/rKppQn/p0 lOtGlqGxfQxZuuYdFsz6GsCmNy8lmslVif4Pj7aeo2us1YJim28MTuR9dytqA9+qMhAJ 1UBMHp8oZk3t3Dt2MWe+X84rMVvYoTfn6ZwIxxpIYf18tk0uX75o0FADBWN4pQVXkuuI JpjKN+7E4AT0bWSYB5fzw18HXndNV9s6gwuMNCY5Zl69wNpHMU4P8UENef7A/iQtBh0B 6krWeqmDWCsS12KDRbuhdSM/43lX85LJYcBBlnHS8sP6A6fooOfVmEC/iIFm8cX0QGX5 q33g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=x3Cow3j4; 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 n16si5209266ejb.509.2020.11.27.06.11.33; Fri, 27 Nov 2020 06:11:58 -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=x3Cow3j4; 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 S1730845AbgK0OGX (ORCPT + 99 others); Fri, 27 Nov 2020 09:06:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:46698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730811AbgK0OGW (ORCPT ); Fri, 27 Nov 2020 09:06:22 -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 335DF206CA; Fri, 27 Nov 2020 14:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606485980; bh=SyQYbFVWej1dCizjJLkWeWMarU7Ofwrc9xiAS6qec0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x3Cow3j4D1FvqGayo0yxGjgkg8Q0TKe2kR1nqvRYCl0dIoJofAcro9e/2TAINP7W2 pLW4fN/uHzJwQiEjMpJ9tusAHL6jUnT//TAh1NsPNjX5FfVUSsN1JGg0iFkCIwIlcl TdYOpWZGwEseYW9STd4kzjPkhAkG/YZyDGzosFPw= From: Greg Kroah-Hartman To: balbi@kernel.org Cc: peter.chen@nxp.com, willmcvicker@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "taehyun.cho" , stable , Greg Kroah-Hartman Subject: [PATCH v2 4/5] USB: gadget: f_fs: add SuperSpeed Plus support Date: Fri, 27 Nov 2020 15:05:58 +0100 Message-Id: <20201127140559.381351-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201127140559.381351-1-gregkh@linuxfoundation.org> References: <20201127140559.381351-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: "taehyun.cho" Setup the descriptors for SuperSpeed Plus for f_fs. This allows the gadget to work properly without crashing at SuperSpeed rates. Cc: Felipe Balbi Cc: stable Signed-off-by: taehyun.cho Signed-off-by: Will McVicker Reviewed-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/function/f_fs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 046f770a76da..a34a7c96a1ab 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1327,6 +1327,7 @@ static long ffs_epfile_ioctl(struct file *file, unsigned code, struct usb_endpoint_descriptor *desc; switch (epfile->ffs->gadget->speed) { + case USB_SPEED_SUPER_PLUS: case USB_SPEED_SUPER: desc_idx = 2; break; @@ -3222,6 +3223,10 @@ static int _ffs_func_bind(struct usb_configuration *c, func->function.os_desc_n = c->cdev->use_os_string ? ffs->interfaces_count : 0; + if (likely(super)) { + func->function.ssp_descriptors = + usb_copy_descriptors(func->function.ss_descriptors); + } /* And we're done */ ffs_event_add(ffs, FUNCTIONFS_BIND); return 0; -- 2.29.2