RE: [PATCH v2] usb: gadget: add SS descriptors to Ethernet gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 25 Jun 2011, Tanya Brokhman wrote:

> Hi Paul,
> 
> > 
> > Hi Tanya,
> > 
> > OK, I didn't know about gadget_is_super_speed(), I will fix up and
> > resend.
> > 
> > By the way, do you know if this part:
> > 
> >  	.strings	= dev_strings,
> >  #ifdef CONFIG_USB_GADGET_DUALSPEED
> > +# ifdef CONFIG_USB_GADGET_SUPERSPEED
> > +	.max_speed	= USB_SPEED_SUPER,
> > +# else
> >  	.max_speed	= USB_SPEED_HIGH,
> > +# endif
> >  #else
> >  	.max_speed	= USB_SPEED_FULL,
> > 
> > is correct? Is the #ifdef CONFIG_USB_GADGET_SUPERSPEED necessary? Or
> > can I just set it to USB_SPEED_SUPER unconditionally, and the composite
> > framework will do the right thing?
> > 
> 
> The above part is correct and IMO should be present similar to the #ifdef
> CONFIG_GADGET_IS_DUALSPEED. It's not a "must" thought since the speed that
> will be reported by the composite driver to the UDC is protected by this
> feature flag. Look at usb_composite_probe() and at how the composite_driver
> is defined.

I disagree.  The max_speed field is the maximum speed supported by the 
function driver.  It has nothing to do with the speed the device is 
currently running at or the capabilities of the UDC hardware.

There's no need for those #ifdef's and no reason to keep them.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux