Re: [RFC v2] usb/gadget: the start of the configfs interface

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

 



On 11/30/2012 04:11 PM, Felipe Balbi wrote:

This loads function without even creating a gadget.  This would allow
the same function to be used in several different gadgets.

why would you load a function before it's actually needed ? We could end
up with users who will just load the function and never actually need
them which will consume memory for no reason.

You create the folder, it loads the module and creates an instance. If
you don't need it, you rmmdir the folder. The only memory you consume
is the module itself.
You load the module upfront so you can configure it which means assign
luns to your storage gadget for instance.

Not necessarily.  If you are not interested in sharing functions between
gadgets, all you have to do is use unique prefix for the functions, for

how do you know how many tty ports u_serial needs to create beforehand ?
I get create an unrealistic upper limit.

But anyway, the point is that sharing functions can be a bit dangerous I
guess. We need to have separate instances for each user IMHO. What if
you have a system with 2 UDCs then you link the same acm.blah-0 to both
UDCs and try to transfer on both of them at the same time ?

That won't work. You can only symlink an instance to one UDC. It is an
instance after all. If you want two ACM ports you need two ACM folder
in  your functions folder:

acm.ttyS0
acm.ttyS1

If you have separate instances that wouldn't be an issue at all.
That are separate instances.

Sebastian
--
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