Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1369456ybk; Thu, 14 May 2020 07:22:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfUoqO2qL5+IJ8OhS/sCu9tnnTok0LuiwDU69f6Hx7RLGi6DHElGiqE4YtolLI/oo0wWco X-Received: by 2002:aa7:d918:: with SMTP id a24mr4515936edr.32.1589466127054; Thu, 14 May 2020 07:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589466127; cv=none; d=google.com; s=arc-20160816; b=G0bI0cjAwLZrITofYckqO0QOyAb8B5fquSE5ZJNkPEA7TucaHYiBfo4Yv85XBrP55Z G98pRMaXdrmlIU5AbCDftWjCfeh1tCyr8Hd4PJ9NPRl2+izZ6hW3HmcXiwrrgLZYUqtT Rb7fAJhrALC0z0DXSzttuQKG6APcMYDpc0PCNRqLn5lmAiLfzAUc8VnrbhJOhb8F4OuI BGXwf07OhYyjGtcrH155ISuUk7ACyEuRTMHhjbmsY4TQ85A2g+ARO0PIPvIkRhPIv5ym 2T6t10fuw/1Of1P1tVkwlPugw6kGUe3yROoeVZZinsfukNoBuzr+5UqpheZAAJ9UkT/Y uypw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OD+b8oBps5yn2jDZpZlXDJUWO5luP5ndwKxb47YYdbs=; b=v7Px5rHrKOYHbSbZJgI8xmPXY2XFjIDJBfNeu9w1k3UqiOePzICyg7I3Izo8blzZU9 +OzXOj3DuU4/oP4aIcvNTkK50eX4Cvtk4rOOVGfwHRXo7IFYCtq7/R4d8Auw0yXIqYro z1RVdCJTeg2ZQmhTdHwghaUXkJYmWurz2EMKQ0uJyxlSHYZVorEkv2DaB3dQHAfWc00l orpOzt3GvrN0hNm1GedOtEaDRKr1E8buAql6UpOwYXwx7hfBYhRjpLvwh3TOrTSJPIER qrA36AV7UmxZirhaqv6qpBFUKNoZqM2+I6fWDtnQiAEDRbJjJ0QLXylKctOpAmwZIGDt Fp3w== 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 q23si1640444eds.325.2020.05.14.07.21.43; Thu, 14 May 2020 07:22:07 -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; 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 S1727113AbgENOR4 (ORCPT + 99 others); Thu, 14 May 2020 10:17:56 -0400 Received: from netrider.rowland.org ([192.131.102.5]:38067 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726050AbgENOR4 (ORCPT ); Thu, 14 May 2020 10:17:56 -0400 Received: (qmail 13785 invoked by uid 500); 14 May 2020 10:17:55 -0400 Date: Thu, 14 May 2020 10:17:55 -0400 From: Alan Stern To: Andrey Konovalov Cc: Felipe Balbi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Dmitry Vyukov , Andrey Konovalov Subject: Re: [PATCH] USB: dummy-hcd: use configurable endpoint naming scheme Message-ID: <20200514141755.GA12181@rowland.harvard.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 10:52:56PM +0200, Andrey Konovalov wrote: > From: Andrey Konovalov > > USB gadget subsystem uses the following naming convention for UDC > endpoints: > > - "ep-a" names for fully configurable endpoints (address, direction and > transfer type can be changed); > > - "ep1in", "ep12out-bulk" names for fixed function endpoints (fixed > address, direction and/or transfer type). > > Dummy UDC endpoints are capable of full configuration, but named using > the second scheme. > > This patch changes the names of generic Dummy UDC endpoints to "ep-aout", > "ep-bin", etc., to advertise that they have configurable addresses and > transfer types (except that Dummy UDC doesn't support ISO transfers), but > fixed direction. > > This is required for Raw Gadget (and perhaps for some other drivers), > that reasons about whether an endpoint has configurable address based > on its name. > > Suggested-by: Alan Stern > Signed-off-by: Andrey Konovalov > --- > drivers/usb/gadget/udc/dummy_hcd.c | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c > index 6e3e3ebf715f..7402ef0d66d2 100644 > --- a/drivers/usb/gadget/udc/dummy_hcd.c > +++ b/drivers/usb/gadget/udc/dummy_hcd.c > @@ -187,31 +187,31 @@ static const struct { > USB_EP_CAPS(USB_EP_CAPS_TYPE_BULK, USB_EP_CAPS_DIR_IN)), > > /* and now some generic EPs so we have enough in multi config */ > - EP_INFO("ep3out", > + EP_INFO("ep-aout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep4in", > + EP_INFO("ep-bin", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_IN)), > - EP_INFO("ep5out", > + EP_INFO("ep-cout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep6out", > + EP_INFO("ep-dout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep7in", > + EP_INFO("ep-ein", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_IN)), > - EP_INFO("ep8out", > + EP_INFO("ep-fout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep9in", > + EP_INFO("ep-gin", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_IN)), > - EP_INFO("ep10out", > + EP_INFO("ep-hout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep11out", > + EP_INFO("ep-iout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep12in", > + EP_INFO("ep-jin", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_IN)), > - EP_INFO("ep13out", > + EP_INFO("ep-kout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > - EP_INFO("ep14in", > + EP_INFO("ep-lin", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_IN)), > - EP_INFO("ep15out", > + EP_INFO("ep-mout", > USB_EP_CAPS(TYPE_BULK_OR_INT, USB_EP_CAPS_DIR_OUT)), > > #undef EP_INFO Acked-by: Alan Stern