Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1154904pxu; Fri, 27 Nov 2020 00:39:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyM4rk2QXkeyw3aBI7NxQ4ASXvCU43vhe0fSxqtAdH/GmPNS6uBDZXb7BAaJdqv+kt6hDBK X-Received: by 2002:a05:6402:7ce:: with SMTP id u14mr6696995edy.19.1606466376465; Fri, 27 Nov 2020 00:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606466376; cv=none; d=google.com; s=arc-20160816; b=qrd68JruGjyBURbQK/08I1QNKq9lR3ouXxOxfj+Um8wP+aAnUD1e4dBZTrK21Rtlld 3oa2Y25fW7ioqVRUkLncrYDZ27nEUl9Xo/8rvyVbts7p/yZ6nQ7FzGpSZZqfC+0xD9v/ rrjBTPJ/V+07tfdXtz1IY3aTXD+0dEKmkAm/FnJN9iBRkXOyvk37SKbshyVDDWO2tC9j xl6uir7Y3JjNtZ4H4GrnDHfzBH9fzx73sTfR/tfyKun2U8A+o2ji6zs3Mx+FyOlH2eQc eIKPMtTUZUpVi6j/leprj+/x7H8tVroIZavgKH0OBYOuPXq4NyXpU4SH13cwOmA9f9ER Iiaw== 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=3BbYB8jyVtVzmYukMQTJC6VVQm7K3N+IaNm1izmdICk=; b=USbA2xs7vrIjbOik1LkazWv37cLc/laMDqcS8fhdO2L2Hu31DOYUuytksxcsvLJp3G 5/o+qfUPZ14x5SZgveGDoAEkztZW9aUCztNhfPJxMquz/xplu+FZfS75eOl2phn2xLqC CtN0jx8vUc4OWob/HRxrHGliHvrZLOUHHxUdFpxRBkNTOcZbr5QSlHMi1dbUld8TT2hb Ea/0GPwmtHGIkBvXoe+RSDAgEtKATEA75jAfoNJdtwUUNlNo2SybgVgWIqB+oeNp8QON Ue10zkAmpAKugoG70CqQsfbgHrknqr1QVvsEwSKuFmEvbny1qtiYbttvFclL6+o/f2Rs X6Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Du5IbFd/"; 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 z24si4762387ejx.378.2020.11.27.00.39.13; Fri, 27 Nov 2020 00:39:36 -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="Du5IbFd/"; 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 S2404781AbgKZSJw (ORCPT + 99 others); Thu, 26 Nov 2020 13:09:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:54998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404684AbgKZSJw (ORCPT ); Thu, 26 Nov 2020 13:09:52 -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 F0E9E20B80; Thu, 26 Nov 2020 18:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606414191; bh=TBn4lRskwGfKCS0hzPftoKsNp+0mva6k5gKZPqvZpdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Du5IbFd/o2LFZwk1w1OmdSQ5I9Odb1KEuzslqVDW3zS6FagJMg4bTWjekZzx59kbl UkNGVQxkVuiSl0XADmcsJxOQ44C91bZuEY1CEN+kiki+mdUJUS/+gESe80WUUW3348 Fk2ZoviJeiQfsFdPBPMD8DWigLSP91rlqsJMM9oU= From: Greg Kroah-Hartman To: balbi@kernel.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "taehyun.cho" , Peter Chen , stable , Will McVicker , Greg Kroah-Hartman Subject: [PATCH 3/4] USB: gadget: f_fs: add SuperSpeed Plus support Date: Thu, 26 Nov 2020 19:09:36 +0100 Message-Id: <20201126180937.255892-3-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: "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: Peter Chen Cc: stable Signed-off-by: taehyun.cho Signed-off-by: Will McVicker 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