Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp840565ybl; Fri, 6 Dec 2019 07:06:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyLdpDeY6UXYDJEuCHQo7MPNKNmsO+H5huCHoueRNrVeFwzIuTyuPa/6N6QOZavXid/vfAi X-Received: by 2002:a05:6808:2c9:: with SMTP id a9mr13166093oid.129.1575644808618; Fri, 06 Dec 2019 07:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575644808; cv=none; d=google.com; s=arc-20160816; b=KibKultSqbqCj5sit2w3XTnPe9P9AQz1QkG2ClNNJJ7B57y1oVg/ZbFZjJKV4/MQH0 pbez0bXS75CI+oa0wpgzTvuhxSeb1UginSO2+pJCHV9hTvFeIJu/dlX/7EJwbhuL6D2W Z7bPyRjU1TFOUe0ZyWaiEp3YYPESOcwpXzze4FNglYBlcEOOAgpUHM/FA5pmZ8nHqI/z km+dt8JT7Z6bLrMKpT4McuNn6pd2PUf5IfTNdpO9pXzb+IA/iDMOcb9Wsyny63fgGxcB Mvvr6mhnM0nukku1TeP4gPwT3fT6o5s+9b8Ao+yKbglDoe9PgrNEcHGxOeCJqJJ9n0ET zTDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=E83BB/30zosSbDB4SQ8JNLSRyjqZfZu69NjLPfVqISM=; b=O6jjPAJsUOn2/HsYmGuRpM1Z8nIEOwP53VCd36t77b6axDePkQ7hwRFdOSzSqA2dLS /9DD8SxbmT7qIksnOusoPdA+ePyuTHF2VNIkB796wvHje5t4NUVnHNqg25brHyWXbUyQ wFKSWzjspOS6sC0Ci4UBHqHVB+dP2nt1sWRtrLOAbMvA6NNFpuNS+e3tCOdSH/xMgzH+ rCXLzIZuLaFc1hqeLcyerPgXlt7+vWuGCJhK1Gftg1OT7gMhfso/Jf+011jub9gckrtw jHSeYDgc+TbQYcutlelLUGyGxJy4LuaVCb0ox9Qpy1uD95uJNtHbwFPyldS9TwufXP38 O5ag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si6953524otr.244.2019.12.06.07.06.34; Fri, 06 Dec 2019 07:06:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726410AbfLFPET (ORCPT + 99 others); Fri, 6 Dec 2019 10:04:19 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:45596 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726268AbfLFPET (ORCPT ); Fri, 6 Dec 2019 10:04:19 -0500 Received: (qmail 1779 invoked by uid 2102); 6 Dec 2019 10:04:18 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 6 Dec 2019 10:04:18 -0500 Date: Fri, 6 Dec 2019 10:04:18 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Jayshri Pawar cc: linux-usb@vger.kernel.org, , , , , , , , , , , , Subject: Re: [RFC PATCH v2] usb:gadget: Fixed issue with config_ep_by_speed function. In-Reply-To: <1575632539-13528-1-git-send-email-jpawar@cadence.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Dec 2019, Jayshri Pawar wrote: > This patch adds additional parameter alt to config_ep_by_speed function. > This additional parameter allows to improve this function and > find proper usb_ss_ep_comp_descriptor. > > Problem has appeared during testing f_tcm (BOT/UAS) driver function. > > f_tcm function for SS use array of headers for both BOT/UAS alternate > setting: > > static struct usb_descriptor_header *uasp_ss_function_desc[] = { > (struct usb_descriptor_header *) &bot_intf_desc, > (struct usb_descriptor_header *) &uasp_ss_bi_desc, > (struct usb_descriptor_header *) &bot_bi_ep_comp_desc, > (struct usb_descriptor_header *) &uasp_ss_bo_desc, > (struct usb_descriptor_header *) &bot_bo_ep_comp_desc, > > (struct usb_descriptor_header *) &uasp_intf_desc, > (struct usb_descriptor_header *) &uasp_ss_bi_desc, > (struct usb_descriptor_header *) &uasp_bi_ep_comp_desc, > (struct usb_descriptor_header *) &uasp_bi_pipe_desc, > (struct usb_descriptor_header *) &uasp_ss_bo_desc, > (struct usb_descriptor_header *) &uasp_bo_ep_comp_desc, > (struct usb_descriptor_header *) &uasp_bo_pipe_desc, > (struct usb_descriptor_header *) &uasp_ss_status_desc, > (struct usb_descriptor_header *) &uasp_status_in_ep_comp_desc, > (struct usb_descriptor_header *) &uasp_status_pipe_desc, > (struct usb_descriptor_header *) &uasp_ss_cmd_desc, > (struct usb_descriptor_header *) &uasp_cmd_comp_desc, > (struct usb_descriptor_header *) &uasp_cmd_pipe_desc, > NULL, > }; > > The first 5 descriptors are associated with BOT alternate setting, > and others are associated with UAS. If the first 5 descriptors are really associated with the BOT alternate setting, why is the second descriptor named uasp_ss_bi_desc? And why is the fourth descriptor named uasp_ss_bo_desc? These names suggest they are associated with UAS. If the same descriptors are used for both settings, the names should reflect this. For example, they could be called bot_uasp_ss_bi_desc and bot_uasp_ss_bo_desc. Alan Stern