Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1368019pxu; Fri, 27 Nov 2020 05:53:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJytDatJXKSfO99BZGNfMgP1wsdqnsbMtUWPPCF6nz8TIWS5ODvnVs/Ltg/4Lu2kMFs2Aecx X-Received: by 2002:aa7:d787:: with SMTP id s7mr7845839edq.205.1606485227440; Fri, 27 Nov 2020 05:53:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606485227; cv=none; d=google.com; s=arc-20160816; b=DcsE6RuWLnMpDWd0JAzPrM0wTQJQwlBc9UORvAr117slSywWra8osyOW4XayDtgTSK pQ1p3iaC0rHCPuXZKFuuNxRpbt8LZbEiIxOCRyIfAbwlJ/imibk8H0sSiBoh0ec//uLJ KEqaCnF8+m2Riecg3vsfcBRGTn3V5ZZu+DJnlfrBlL23hHUe7x0kGHGvHJz2ECzOJwHR EpQ/gw/IMlm8/bZ0p2VA/uAGhbPMPQmLvEntZbnvGQrCAcmoKLGBu06ESTq1ajCnVbTZ 1WpRUk4GjKat1d3FPwkDVYcEgh2snELGGRdZY2MP2h3ZveanAGHQ7+gKPhupG/Bhh8T8 XGrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hQa0SSRpd3bK48vrG5DyvHohQHEVxjuqKnrGSxlA8Mo=; b=bU0+4iYuOW4xARcQbJDTGounvsxR5eleR2KIYSUp4ugOMjItVKO0Mn3pSqKYjTab2u LdE3Hyu570LCNK/x5FA2YUYt/7JQbZWQTBFnM01+u5dvZbobFp8UVwLPaKXkkuECdW2n TB7/ULV9PAlsFf0cuNSdd5YIEKaSOHoqwgfZVoMYYZEL/mDtcRxKMCpa6Cz5nx2wgHCa F/qi4yQ4H5sQzerNuOsM6Mt73xQ77Phf+JREqkcxt+EsJWSgiyWBEq7y8pELgflCY/bt GjtVsxyQdMzqt8+cVomDwa1g+WosthlM1OF9Za9VfxGVu+L2uOnPHHDDc6Xz514z5517 uFFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oaq4mlru; 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 d7si2233638ejw.393.2020.11.27.05.53.24; Fri, 27 Nov 2020 05:53:47 -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=oaq4mlru; 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 S1730708AbgK0Nul (ORCPT + 99 others); Fri, 27 Nov 2020 08:50:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:41826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730316AbgK0Nul (ORCPT ); Fri, 27 Nov 2020 08:50:41 -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 EA27F2224A; Fri, 27 Nov 2020 13:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606485040; bh=uxMc+v5y4/CAVDXdUUY5D5KHB8dWir/j+6ArLkukR9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oaq4mlruYrAHadOKy20SeMZh5bUP3ROfkvMrH9XFd86Tt9gOEDzVya9pXHn/umn/v EuUOr/+e85Ffg0ARyJOHFd5sr7XQBqE4VoBTMZVOELk3rAiZQS32Ten1s08XyV211H K/3Xjz9Wj41BAwR3H5iQ7HSg4YKJOmVr3BU/pIIg= Date: Fri, 27 Nov 2020 14:50:37 +0100 From: Greg Kroah-Hartman To: Peter Chen Cc: "balbi@kernel.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "taehyun.cho" , stable , Will McVicker Subject: Re: [PATCH 3/4] USB: gadget: f_fs: add SuperSpeed Plus support Message-ID: References: <20201126180937.255892-1-gregkh@linuxfoundation.org> <20201126180937.255892-3-gregkh@linuxfoundation.org> <20201127025517.GA22238@b29397-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201127025517.GA22238@b29397-desktop> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 27, 2020 at 02:55:47AM +0000, Peter Chen wrote: > On 20-11-26 19:09:36, Greg Kroah-Hartman wrote: > > 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)) { > > Why likely is used? Currently, there are still lots of HS devices on market > or on the development. It looks to be a cut/paste of the other tests above, all of which say "likely" which we all know is not true at all. I'll leave this now, and add a patch that removes them all as this is NOT a function where it should be used at all. thanks for the review. greg k-h