Re: [PATCH 2/2] usb: gadget: convert all users to the new udc

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

 



On Mon, 13 Jun 2011, Felipe Balbi wrote:

> > > The same could've been done for g_file_storage :-)
> > 
> > It essentially _was_ done; the result was g_mass_storage.  The two 
> > drivers are almost but not quite entirely the same (apart from use of 
> > the composite framework).
> 
> I see, the problem now is that we have two drivers doing somewhat the
> same thing and while the ARM people already got bashed because of "not
> sharing enough code" we have duplicate drivers on the gadget framework
> :-)

Yeah, it's a mess.  I don't know what would be best.

> We also need to a find a better way to get rid of the inclusion of C
> source files. I understand why Dave did it, but it's been quite some
> time since those patches were committed - e.g.
> 7e75bc0f9006e995a0fa25f0a285addc3d5fd5cb - and no progress has been made
> to fix that up. Probably Clang's link-time optimization would help a lot
> on that, but Clang still needs quite some work to be usable for us, so
> we need something else. Any ideas ?

Could these routines go into the UDC core?

> On another matter, do you think it's worth moving g_(mass|file)_storage
> to target ? We asked Tatyana to make UAS use target, but what about the
> legacy MSC gadgets ? (I have to say I didn't even look into target's
> code)

It would be a big change, a lot bigger than adding in the composite 
framework.  In fact, at this point I still don't know exactly what 
would be involved -- but I suspect it would cause a noticeable increase 
in the kernel code size which would not be good for embedded platforms.


> > Okay, now I get it.  You can understand why I was confused, seeing as 
> > how your original message said:
> > 
> > 	We also need to cleanup all the ->start()/->stop() calls from
> > 	all udc controllers, then we need to uninline all the
> > 	operations we have on gadget.h ...
> > 
> > Evidently you didn't really mean "all".
> 
> the keyword was "operations", now that I read it again it's not clear
> enough, but it was supposed to refer to struct usb_gadget_ops :-)

Ah.  But why uninline these things?  The inline function merely checks
that the function pointer is non-NULL before invoking it.  Would you 
want to send a notification even when an unimplemented gadget_ops is 
called?

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