This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Ethernet Gadget "Error inserting g_ether: No such device"

Other Parts Discussed in Thread: OMAPL138, DA8XX

Dear community,

I've been trying to set up the Ethernet over USB for quite a while already. After a couple of weeks I realized that i needed more understanding so i started a trip into the world of Linux kernels.
Currently I am working with the kernel version 3.1.10, provided by the OMAPL138 SDK.

I'm able to include the USB Ethernet Gadget functionality as a module (<M>) but when i load the module i get:

modprobe g_ether
FATAL: Error inserting g_ether (/lib/modules/3.1.10/kernel/drivers/usb/gadget/g_ether.ko): No such device

Some people gave some tips to solve it http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/p/100384/367311.aspx#367311 but for me the result is the same:

FATAL: Error inserting g_ether (/lib/modules/3.1.10/kernel/drivers/usb/gadget/g_ether.ko): No such device

I realized that displaying the system message buffer (dmesg) the following message appear when trying to load g_ether through modprobe:

couldn't find an available UDC

I'm really stucked into something that it seems some people has had success so i might be missing something.
Any suggestions are welcome.

Thanks in advance. 

  • Hello Victor Mayoral,

     As you said you have compiled USB as g_ether.ko module but have you copied it to SDCARD of FLASH,

    For OMAP processors after compiling modules following is the command to copy modules into SDCARD
      

      sudo make ARCH=arm modules_install INSTALL_MOD_PATH=/mnt/sdcard
        <assuming his SD card is mounted in this path /mnt/sdcard>

    Regards,

    Rajeev.

  • Dear Rajeev,

    Thanks for your comment. Yes i've done it that.

    And also tried 10s of combinations at menuconfig all so that i could use the Ethernet gadget over USB. Still no luck.

    Right now i'm trying to go with the last release of the linux-davinci version from the Arago git repositories...

    Tough road this one!!

    Cheers!

  • Can you post your Linux kernel .config file?

    Steve K.

  • Here it is Steve

    1462.config.txt

    Uploaded again

  • Hello,

    I'd be interested if you could find any solution to this problem?

    Thanks,

    Istvan

  • Hi Istvan,

    I'm sorry to say that i could not find the solution. I tried tenths of different settings.

    Good luck with it.

  • Thanks for the feedback Victor..

    Would be nice though, if somebody from TI could look into that...

    Istvan

  • Can you please post the output of command 'cat /proc/driver/musb_hdrc'?

  • I think I have figured it out meanwhile. At least, one step further.

    I check /proc/driver/musb_hdrc, but it was not even existing.

    After couple of added kernel debug prints, I noticed that the call to da8xx_register_usb20 is actually missing from board-omapl138-hawk.c (I'm using an L138 LCDK board).

    So I added this into omapl138_hawk_init, just before the existing omapl138_hawk_usb_init() call.

    Now it looks much better.

    lsusb lists the device, it's also present in /proc/driver, etc.

    Still not perfect thought, I receive 

    VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 00080108

    when I plug in a wifi dongle, but it's much closer now :)

  • Good progress!

    Which kernel package do you use? I am kinda surprised the board.c does not get MUSB initialized properly, if it is TI PSP package.

    I don't know much about all the different boards based on omapl138, but in general VBUS_ERROR means during USB device enumeration, the VBUS voltage dropped below the valid threshold. You could check the board schematics to make sure the VBUS line has a minimum 120uF capacitor, which is required in USB Specs.

    You can also try plugging in different USB devices, like mouse, thumb drive to see if VBUS_ERROR happens all the time.

  • Thanks :)

    I'm using DaVinci-PSP-SDK-03.22.00.02. Actually, I'm a bit surprised too about this, but anyway, that's not the first problem with this, I also had to make some changes for mmc/sd to work (http://e2e.ti.com/support/embedded/linux/f/354/t/245170.aspx). 

    I actually went a step further and also merged some more usb20 init to the board support file, adding:

    cfgchip2 &= ~CFGCHIP2_OTGMODE;
    cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;

    With that it could detect the wifi dongle, now I need to get rid of the debug prints I added.

    Again, thanks for the tip!

  • Do you mean adding cfgchip2 changes makes VBUS_ERROR go away?

  • I think so. One of the other board support files in mach-davinci has some comment about this, if I remember correctly.

    Now I got rid of the printk's and after a clean boot I could use my wifi dongle over the OTG port :)

  • Hi

    Me too facing same issue but you have solved the issue.

    I'm trying to enable the USB2.0 OTG in J2 and i modified as follows

    static __init void omapl138_hawk_usb_init(void)
    {
    int ret;
    u32 cfgchip2;

    ...

    ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
    if (ret) {
    pr_warning("%s: USB 1.1 registration failed: %d\n",
    __func__, ret);
    goto usb11_setup_fail;
    }

    //USB2.0 OTG start

    /*
    * We have to override VBUS/ID signals when MUSB is configured into the
    * host-only mode -- ID pin will float if no cable is connected, so the
    * controller won't be able to drive VBUS thinking that it's a B-device.
    * Otherwise, we want to use the OTG mode and enable VBUS comparators.
    */

    #ifdef CONFIG_USB_MUSB_HOST
    cfgchip2 |= CFGCHIP2_FORCE_HOST;
    #else
    cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;
    #endif

    cfgchip2 &= ~CFGCHIP2_OTGMODE;
    cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;

    pr_info("USB 2.0 OTG initialization..!!");

    ret = davinci_cfg_reg(DA830_USB0_DRVVBUS);
    if (ret)
    pr_warning("%s: USB 2.0 PinMux setup failed: %d\n",
    __func__, ret);
    else {
    /*
    TPS2065 switch @ 5V supplies 1 A (sustains 1.5 A),
    * with the power on to power good time of 3 ms.
    */
    ret = da8xx_register_usb20(1000, 3);
    if (ret)
    pr_warning("%s: USB 2.0 registration failed: %d\n",
    __func__, ret);
    }
    //USB2.0 OTG end 
    return;

    usb11_setup_fail:
    gpio_free(DA850_USB1_OC_PIN);
    usb11_setup_oc_fail:
    gpio_free(DA850_USB1_VBUS_PIN);
    }

    and configuration file modification is

    #
    # USB Host Controller Drivers
    #

    CONFIG_USB_MUSB_HDRC=y
    CONFIG_USB_MUSB_DA8XX=y
    CONFIG_MUSB_PIO_ONLY=y

    #
    # USB Miscellaneous drivers
    #

    CONFIG_USB_GADGET=y
    CONFIG_USB_GADGET_VBUS_DRAW=2
    CONFIG_USB_GADGET_DUALSPEED=y

    #
    # OTG and related infrastructure
    #
    CONFIG_USB_OTG_UTILS=y
    # CONFIG_USB_GPIO_VBUS is not set
    # CONFIG_USB_ULPI is not set
    # CONFIG_NOP_USB_XCEIV is not set

    got built success fully and i got this error

    da8xx_musb_interrupt 350: VBUS error workaround (delay coming)
    da8xx_musb_interrupt 350: VBUS error workaround (delay coming)

    root@omapl138-lcdk:/proc/driver# ls
    rtc snd-page-alloc
    root@omapl138-lcdk:/proc/driver# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    there is no node for musb_hrdc. 

    I dono what i missed and please let me know the issue and how to fix it.

    Here i've attached log file and defconfig file.

    7455.omapl138_lcdk_defconfig.txt

    2772.dmesg.txt

    Thanks

    Sangly

  • Dear,

    me too solved the same issue in adding the additional

    cfgchip2 |= CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN;

    even if in host only mode.

    I am in kernel 3.17.0, now usb works, but note, key must be inserted at boot, an will not be detected anymore at a new re-insertion.

    Without the line above, instead, detection of the usb key works properly, but  the following error doesn't allow to access the media:

    VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 00080108
    

    Now, since the same kernel and board support config are the same of kernel 3.5.1, i am expecting a final clarification about why this drivers are not working properly anymore. From 3.5.1 to 3.17 there were some changes, one is to put CONFIG_USB_MUSB_DA8XX not selectable anymore (broken) in Kconfig (broken need to be removed to allow usb to work).

    Felipe Balbi <balbi@ti.com> seems to be a contributor of last patches, that maybe can clarify.

    Regards