Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp360315pxj; Thu, 17 Jun 2021 04:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWX54NCJJbJtznSIj7PPYCWdQ4JdnhFRZAIUpknYBavrMh8I+oAeqP3UFAfivlEQKro/oK X-Received: by 2002:aa7:c50d:: with SMTP id o13mr5740880edq.9.1623929648844; Thu, 17 Jun 2021 04:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623929648; cv=none; d=google.com; s=arc-20160816; b=mV0dvm1SfZFK59aQAgC+b7v7p4tc49dlzRRVMe2siabOggD5vs3rp9F9F61s6GNUYZ Dr48IelBVGlMuwRPkP9ZBhExFi2oglBtkU+Mx/gIEyTTVZ3Oo+1n1z1XzajFu02g6keU /NO3DAFaxymasuEBCBLwWyoWDIyWXkH3C0nUAUykbVM7gFHlMC+eCqodBadgUrFOZRdl rj9MqXcNXJXIJ0K+MpbYmLDtvKuQQuyYiJUWictxWtft1WrGgDzFz04sz+DnCP/AMPdE 1N2JvOJJG+NToN0etwXsDRRY6vQaMFquTYh5Kg19gIrHnnhD8oEKlRMIhuanrh+ljoNY WNXw== 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=mLK7SI32GvlFKHSnWpiA+Do8TKsAc18Hom6AWnNxFng=; b=FYf7jIxtaejioOOe8Mwm3Pcjx8xkzcrmxfh7vii8d07cD/tcxNnRIHBx+g8uJklEZ3 pXD5kkYf91llURQZCOaLTSdoa267+ixrotodocMlwLOFDXEMlwedT/0WVJvm0lLIQDWB oR/Fql0OoYOpB5eueI72kbk/s70xkIrDn4jCuo7AvPkxBMaewHygvDBunR5sCCnw1j9D /j5uqESFpzByKkjOFLAqKbxYMumO9QlaR0KUVsafdNl1j32qySgxEybZjYDggAa+BL+v 4zi32IL8MThB1jOLqcow8A4dU+7wN6nEomcMaDU2sNDdsOqHtZ34lUPxWEWLLX/707t0 LUuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZDgL3tlG; 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 6si5005886ejr.201.2021.06.17.04.33.46; Thu, 17 Jun 2021 04:34:08 -0700 (PDT) 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=ZDgL3tlG; 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 S232396AbhFQLMs (ORCPT + 99 others); Thu, 17 Jun 2021 07:12:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:52864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232383AbhFQLMr (ORCPT ); Thu, 17 Jun 2021 07:12:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A82F61209; Thu, 17 Jun 2021 11:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623928239; bh=PMeB3LBuRoII/I325D9/2s+Ps577P3b6ic97qivvTT0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZDgL3tlGpx/x9+gxDv0Jn8OZV88HjcrOL2xyZ/KdkSP1bGLYWhYt7wua3oXvEMUs5 eSSkwTYhAI6kjGG3ScJ+IkbkU+q3rrld+95QGvyUhts6U18PF1bPiB1Ic0TaHQJPvW L94tt8hesFhQeMUBN/tTuA3SnaKD5/eM5x98kEbk= Date: Thu, 17 Jun 2021 13:10:36 +0200 From: Greg KH To: Wesley Cheng Cc: balbi@kernel.org, robh+dt@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, frowand.list@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, jackp@codeaurora.org, fntoth@gmail.com, heikki.krogerus@linux.intel.com, andy.shevchenko@gmail.com Subject: Re: [PATCH v10 3/6] usb: dwc3: Resize TX FIFOs to meet EP bursting requirements Message-ID: References: <1623923899-16759-1-git-send-email-wcheng@codeaurora.org> <1623923899-16759-4-git-send-email-wcheng@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623923899-16759-4-git-send-email-wcheng@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 02:58:16AM -0700, Wesley Cheng wrote: > +static int dwc3_gadget_check_config(struct usb_gadget *g, unsigned long ep_map) > +{ > + struct dwc3 *dwc = gadget_to_dwc(g); > + unsigned long in_ep_map; > + int fifo_size = 0; > + int ram1_depth; > + int ep_num; > + > + if (!dwc->do_fifo_resize) > + return 0; > + > + /* Only interested in the IN endpoints */ > + in_ep_map = ep_map >> 16; Wait, this "map" is split up into 16/16 somehow? So it's only 32bits big? Where did you document this map structure? Why is it needed at all, you have the gadget, don't you have access to the full list of endpoints here as well? confused, greg k-h