Re: [PATCH 06/17] usb/gadget: add some infracture to register/unregister functions

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

 



> On 11/08/2012 03:53 PM, Michal Nazarewicz wrote:
>> The code looks promising, and definitely a step in right direction, but
>> I don't think this configuration structure is good solution for
>> ConfigFS.
>>
>> Sure, many (most) functions have same static unstructured configuration
>> arguments which can be expressed in a flat array, but if you look at
>> mass storage, this is not really a good solution.
>>
>> At the moment, mass storage is using a static and flat list of arguments
>> because it uses module parameters, but the “file” argument is very
>> ugly...  It accepts a list of file names to use for each LUN.
>>
>> With ConfigFS I believe we can do much better than to use inflexible
>> list of arguments.  In particular, the way I would see mass storage
>> function be configured from ConfigFS is:
>>
>> 	$ cd /path/to/mass/storage/function/configfs/directory
>> 	$ ls
>> 	nluns
>> 	$ echo 2>nluns
>> 	$ ls
>> 	nluns lun0 lun1
>> 	$ echo 0>lun0/ro
>> 	$ echo 0>lun0/cdrom
>> 	$ echo 0>lun0/nofua
>> 	$ echo 0>lun0/removable
>> 	$ echo /path/to/some/file>lun0/file
>> 	$ echo 1>lun0/ro
>> 	$ echo 1>lun0/cdrom
>> 	$ echo 0>lun0/nofua
>> 	$ echo 1>lun0/removable

On Thu, Nov 08 2012, Sebastian Andrzej Siewior wrote:
> This is actually what the tcm gadget does today.

Sounds great!

> So let me then just drop the usbf_option thingy then. So we keep the
> configuration we have right now and we add configfs specific code to
> make something like that possible.

Yeah.

I think that it's better to add code that we intend to keep.  My feeling
about the flat array of attributes is that it won't solve all the
problems and thus it would be ripped out soon anyway.

Keep up the good work!

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--

Attachment: pgpSiuWKY37pR.pgp
Description: PGP signature


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

  Powered by Linux