From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753103Ab1HRR1Y (ORCPT ); Thu, 18 Aug 2011 13:27:24 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:57075 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750923Ab1HRR1X (ORCPT ); Thu, 18 Aug 2011 13:27:23 -0400 Date: Thu, 18 Aug 2011 13:27:21 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Michal Nazarewicz cc: Sergei Shtylyov , Felipe Balbi , Sebastian Andrzej Siewior , Yang Rui Rui , Greg Kroah-Hartman , , Subject: Re: [PATCHv2] usb: gadget: get rid of USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Aug 2011, Michal Nazarewicz wrote: > For the most part, usb_composite_probe() is called only once in module's > init function. As far as I know, only g_ffs calls it several times. So > in all cases expect for g_ffs, composite_driver.speed = > min(composite_driver.speed, > driver->max_speed) should have the same effect as composite_driver.speed > = driver->max_speed. > > > For example, if you have a composite gadget where one of the function > > drivers can handle SuperSpeed and the other can't go beyond high speed, > > the overall gadget must never run faster than high speed. > > Shouldn't that be dealt in usb_add_function()? I cannot see any code that > would do that here atm though. Maybe you're right. But isn't that too late? The UDC driver has to know the gadget driver's limitations before it can connect to the host. Alan Stern