On Sat, 2 Sep 2006, Marc Singer wrote:

> On Fri, Sep 01, 2006 at 10:55:45PM -0400, Alan Stern wrote:
> > On Fri, 1 Sep 2006, Marc Singer wrote:
> > 
> > > I'd like to use g_file_storage without loading it as a module.  If I
> > > can pass something like g_file_storage:g_removable=1 on the command
> > > line, then I can load the backing store once the kernel is loaded.  Is
> > > there a way to make this work?
> > > 
> > > I suppose I could set the removable bit to 1 by default by editing the
> > > source.  But, it would serve me better to pass this to the kernel at
> > > startup.
> > 
> > The boot command-line option you would use is: g_file_storage.removable=1
> > 
> > It might work if you also build the device controller driver into the 
> > kernel.  I've never tried it.  Let us know what happens.
> > 
> > Why don't you want to load g_file_storage as a module?
> 
> I did that as a test and it works fine.
> 
> In this project, it is easier to manage the software if there are no
> modules.  Modules take more memory and there is additional software
> and kernel code for loading them.  In this case, drivers are used or
> they are not used.  
> 
> Thanks for the pointer.

You're welcome.

> One other thing, is there a sysfs entry that tells me that the gadget
> interface is active?

You mean "active" as in "powered on and receiving packets", as opposed to 
"inactive" as in "powered off or suspended and not receiving packets"?  
No, there isn't any standard sysfs entry for that.

It's not clear whether one would rather just know the current state or be 
notified whenever the state changes.  Either way, that information is not 
exported to userspace.

To do it properly would require modifying all the device controller 
drivers.  However if all you care about is g_file_storage then you could 
add your own sysfs attribute file pretty easily.

Or do you mean "active" as in "currently executing a command", as opposed 
to "inactive" as in "waiting to receive the next command"?  That's not 
available in sysfs either.  It would be of limited utility, since commands 
come and go so quickly.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to