Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1405432pxb; Fri, 21 Jan 2022 17:53:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJz124AeBt5S5n/47oZnzUxwvNPhjXKJP5CgCCsF6wH0BUvE/F8MpJxkZ+oKO8gCKZBhevGt X-Received: by 2002:a05:6a00:1acb:b0:4c3:2612:75ba with SMTP id f11-20020a056a001acb00b004c3261275bamr5958567pfv.59.1642816420998; Fri, 21 Jan 2022 17:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816420; cv=none; d=google.com; s=arc-20160816; b=zw0SdLf5ze3P4iX8afet+seWkS9dvnqIw7pExXoQxtEPqeBMWu2oPoTNGzXzt+8igB qsMTsqWceRGA7pjmzD5Pp7VfxM+uIdIHdR5yKYONLiDBY6x+Cteik6Kclsmpslgktqb4 9e7JjKNZcORzz/gyDSNtrR36vbLuekZzd08cG5zAH8hS5C5ZQHs7LX8VUKxylIxrMtjA fDFSOmjYe8dTRr455LxKrhIPcvnMOo1d99g8D8wIw+OZURbkv8pAic04c6a2Z60L4xhk wS0dQ/n46NAWOd7PHmW1pqvFJ0v99iptz+YBRTgQnvw52+LtAsSMoH2C7PNrn+9bTIkx m6nw== 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; bh=tEBndelY3BfQM+U39Vy0YGhS5XS669GB1ncUVYcnnmI=; b=0JX3vo+m/n/KeOpoPJJ+I95iaptwwKoxx/wdhwlTnH7KzY7nBBwVY3Ha9sbz0LHB9U Pxw1eePkh8bDmokFNU6m317U0cwLVUWBNPuH+aq2xKnWMLD9B01tWqArGp8DUg/FkVff YhkUjo1Xe82U6EtEEanbf4hac1KQT2A+2rPq636nwcxY6c3uif4sVSzEGHl+Klp7omaD VkCFrEf2ynF0iHp9/GhHSVBMK/JiA5YhElFNrzaSoYixm6nU6Ruq408Rnk1VIDMQSp4q BducF8fucdfcWdNajlNzxHwOzbpZ7ahvGtftf+NhvgvNkhjKaWEJWlobgafw8E1xcsrS z/Xw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r187si8556252pgr.87.2022.01.21.17.53.28; Fri, 21 Jan 2022 17:53:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381487AbiAUPJD (ORCPT + 99 others); Fri, 21 Jan 2022 10:09:03 -0500 Received: from netrider.rowland.org ([192.131.102.5]:47619 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1381484AbiAUPJC (ORCPT ); Fri, 21 Jan 2022 10:09:02 -0500 Received: (qmail 17761 invoked by uid 1000); 21 Jan 2022 10:09:00 -0500 Date: Fri, 21 Jan 2022 10:09:00 -0500 From: Alan Stern To: Pavankumar Kondeti Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: gadget: f_sourcesink: Fix isoc transfer for USB_SPEED_SUPER_PLUS Message-ID: References: <1642764684-26060-1-git-send-email-quic_pkondeti@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1642764684-26060-1-git-send-email-quic_pkondeti@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 05:01:24PM +0530, Pavankumar Kondeti wrote: > Currently when gadget enumerates in super speed plus, the isoc > endpoint request buffer size is not calculated correctly. Fix > this by checking the gadget speed against USB_SPEED_SUPER_PLUS > and update the request buffer size. > > Signed-off-by: Pavankumar Kondeti > --- > drivers/usb/gadget/function/f_sourcesink.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c > index 1abf08e..0a423ba 100644 > --- a/drivers/usb/gadget/function/f_sourcesink.c > +++ b/drivers/usb/gadget/function/f_sourcesink.c > @@ -584,6 +584,8 @@ static int source_sink_start_ep(struct f_sourcesink *ss, bool is_in, > > if (is_iso) { > switch (speed) { > + case USB_SPEED_SUPER_PLUS: > + fallthrough; There's no need for this "fallthough" line. You're allowed to have multiple case labels for a single block of code. Alan Stern > case USB_SPEED_SUPER: > size = ss->isoc_maxpacket * > (ss->isoc_mult + 1) * > -- > 2.7.4 >