Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PHult
New Contributor II
1,418 Views

Disable g_mutli / alternatives?

I'm trying to remove g_multi from my setup but I can't get the USB to work without it.

Alternatively what is the configuration to disable all g_multi features?

I will be running the Edison module in USB host mode only.

I've compiled a custom image with minimal modifications(added one module for an external ethernet driver).

At this stage it works, though I would like to remove the mass storage and usb-ethernet-device functionality(which I believe is served by the g_multi module).

My first approach was to disable the g_multi module completely.

After a reboot lsusb did no longer work(unable to initialize libusb: -99).

Then I tried modprobe g_multi after which lsusb worked.

On the same running instance I ran rmmod g_multi and now the USB system still works.

I've looked at the loaded modules.

Thsese were loaded from start:

smsc95xx 31910 0

bcm_bt_lpm 13708 0

bcm4334x 587105 0

And these were added after modprobe g_multi

usb_f_acm 14335 1

u_serial 18582 1 usb_f_acm

g_multi 70924 0

libcomposite 39238 2 usb_f_acm,g_multi

After rmmod g_multi only that module was unloaded.

Now I tried to enable g_multi but removed all options from /etc/modprobe/g_multi.conf

After a reboot there was no longer a usb0 network device as wanted.

But this time the USB system did not work at all.

What would the best approach to replace/reconfigure g_mutli so that it doesn't generate usb mass storage device nor a usb0 network device?

And still have the usb system working?

0 Kudos
5 Replies
idata
Community Manager
71 Views

Hello Peter-H,

 

 

Thank you for interest in the Intel® Edison Breakout Board.

 

 

I understand that you tried several methods to disable some of the USB features (USB mass storage, usb0 network) while keeping others (lsusb).

 

 

I'll be needing more time to research, since I'm not quite sure if there is a setup that may enable the USB port to work while removing all the options from g_multi.

 

 

I'll contact you through this community if I find relevant information, thank you for your patience.

 

 

Regards,

 

Andres
idata
Community Manager
71 Views

Hello Peter-H,

 

 

I think the best approach is to disable the USB as mass storage device with the mmod g_multi command (https://communities.intel.com/message/381579# 381579 https://communities.intel.com/message/381579# 381579 ) and then create a system service to disable usb0 network device (https://communities.intel.com/message/339349# 339349 https://communities.intel.com/message/339349# 339349).

 

 

Regards,

 

Andres
idata
Community Manager
71 Views

Hello Peter-H,

 

 

I was wondering if you had the chance to try the suggestion provided.

 

 

Regards,

 

Andres
PHult
New Contributor II
71 Views

I'm unfamiliar with mmod but I assumed you and the article you linked to meant rmmod.

As I understood your answer the solution is to automate the steps I ran manually.

I haven't tried your solution yet.

The network part I addressed by removing the usb0 configuration files.

The mass storage device is not critical to get rid of as I won't be using that partition anyway.

I'm curious about the USB system dependency on g_multi. I guess there is some insight to be found in the source about the module parameters and what could trigger USB to work without loading guest mode features.

Tried loading the other modules pulled in by g_multi without ever having g_multi loaded but that did not work the last time i tried it.

idata
Community Manager
71 Views

Hello Peter-H,

 

 

Yes, you are right, the solution suggested implies automatization of the steps that you already tried manually.

 

 

As you probably know, an in-depth documentation regarding the g_multi kernel module is not available. There are a couple of sites that provide a brief description of the module ( https://www.kernel.org/doc/Documentation/usb/gadget_multi.txt, http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f176a5d81214864904d285912d...) but those doesn't show real examples on how to accurately manipulate the parameters/functions associated with the module.

 

 

An alternative to learn more about the development of the g_multi kernel module is reading the documentation written by Michal Nazarewicz (the author of the module itself) in http://lkml.iu.edu/hypermail/linux/kernel/1005.2/01483.html.

 

 

So, unfortunately, that's a Linux-documentation issue that is out of the scope of this support technical team.

 

 

Regards,

 

Andres
Reply