lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v12 7/8] usb: Adding SuperSpeed support to dummy_hcd
Hi,

On Wed, May 25, 2011 at 01:52:15PM +0300, Tanya Brokhman wrote:
> > > > > following:
> > > > > 1. if CONFIG_USB_GADGET_SUPERSPEED=true, existing gadget drivers
> > > > > are still functional with dummy_hcd since as I already mentioned,
> > > > > they will be enumerated through HS root hub and thus the
> > > > > gadget.speed will
> > > > be set to HS.
> > > > > This is true for all gadget drivers, including the once that
> > don't
> > > > > define SS descriptors.
> > > >
> > > > only due the module parameter, right ?
> > >
> > > Due to the module parameter default value being FALSE, yes.
> >
> > Ok, so let's take your approach but change the speed in the gadget
> > driver structure, put your ifdef somewhere like here:
> >
> > diff --git a/drivers/usb/gadget/composite.c
> > b/drivers/usb/gadget/composite.c index 1ba4bef..d02d6e8 100644
> > --- a/drivers/usb/gadget/composite.c
> > +++ b/drivers/usb/gadget/composite.c
> > @@ -1224,7 +1224,11 @@ composite_resume(struct usb_gadget *gadget) /*-
> > -----------------------------------------------------------------------
> > -*/
> >
> > static struct usb_gadget_driver composite_driver = {
> > +#ifdef CONFIG_USB_GADGET_SUPERSPEED
> > + .speed = USB_SPEE_SUPER,
> > +#else
> > .speed = USB_SPEED_HIGH,
> > +#endif
> >
> > .unbind = composite_unbind,
> >
>
> I have no problem updating static struct usb_gadget_driver composite_driver
> as you suggested but it seems the same as updating it @
> usb_composite_probe()...

still, you will have two places poking at the same field. It's better to
keep it at once, update only that and we will take your approach.

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-05-25 13:27    [W:0.085 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site