GADGET g_serial Module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GADGET g_serial Module

7,061 Views
munoz0raul
Contributor II

Hello,

I'm try to use the g_serial module in the kernel 3.8 but all the times I got problems like:

g_serial: Unknown symbol ...

I was looking that in the kernel 2.6 this module works fine, then I was comparing the kernel source code and than I saw that in 2.6 that we have an option in gadget seasion:

Driver->USB>Gadget>

USB Peripheral Controller

-->Freescale USB Device Controller

OBS:

config USB_GADGET_ARC

        boolean "Freescale USB Device Controller"

        depends on ARCH_MXC || ARCH_STMP3XXX || ARCH_MXS

        select USB_GADGET_DUALSPEED

        select USB_OTG_UTILS

        select USB_GADGET_DUALSPEED if USB_GADGET_FSL_1504 || USB_GADGET_FSL_UTMI

        help

           Some Freescale processors have a USBOTG controller,

           which supports device mode.

           Say "y" to link the driver statically, or "m" to build a

           dynamically linked module called "arc_udc" and force all

           gadget drivers to also be dynamically linked.

This option is not avaiable in kernel 3.8.

Some one know if this is the main reason for g_serial doesn't work in kernel 3.8?

There is some thing to solve it easily?

Thanks for All Help.

Labels (3)
Tags (2)
0 Kudos
Reply
5 Replies

2,872 Views
lategoodbye
Senior Contributor I

Hello Raul,

USB Peripheral support for i.MX28 started with kernel 3.11 (driver: ChipIdea Highspeed Dual Role Controller ), before there was only USB Host support.

BR

Stefan Wahren

0 Kudos
Reply

2,872 Views
munoz0raul
Contributor II

Hello,

I try the same using kernel 3.12 and I got the same problem:

od g_serial.ko lib/modules/3.12.0-00128-g928c8b1/kernel/drivers/usb/gadget# insm

[  340.570493] g_serial: Unknown symbol usb_remove_function (err 0)

[  340.578534] g_serial: Unknown symbol usb_get_function_instance (err 0)

[  340.586400] g_serial: Unknown symbol usb_add_config_only (err 0)

[  340.592506] g_serial: Unknown symbol usb_string_ids_tab (err 0)

[  340.600235] g_serial: Unknown symbol usb_get_function (err 0)

[  340.607270] g_serial: Unknown symbol usb_composite_unregister (err 0)

[  340.615045] g_serial: Unknown symbol usb_put_function (err 0)

[  340.620889] g_serial: Unknown symbol usb_add_function (err 0)

[  340.628487] g_serial: Unknown symbol usb_composite_probe (err 0)

[  340.635859] g_serial: Unknown symbol usb_composite_overwrite_options (err 0)

[  340.643002] g_serial: Unknown symbol usb_put_function_instance (err 0)

[  340.651334] g_serial: Unknown symbol usb_ep_autoconfig_reset (err 0)

Error: could not insert module g_serial.ko: Unknown symbol in module

I enable all the chipidea options and the gadget for g_serial.

Do you know why I got this symbols errors?

Thanks for all help.

0 Kudos
Reply

2,872 Views
munoz0raul
Contributor II

I found why this symbols happen.

I need to start 2 modules before g_serial.ko.

/lib/modules/3.12.0-00128-g928c8b1/kernel# insmod fs/configfs/configfs.ko

/lib/modules/3.12.0-00128-g928c8b1/kernel# insmod drivers/usb/gadget/libcomposite.ko

/lib/modules/3.12.0-00128-g928c8b1/kernel# insmod drivers/usb/gadget/g_serial.ko

But I get a new error when I start the g_serial.ko

[  314.004346] g_serial gadget: Gadget Serial v2.4

[  314.008943] g_serial gadget: g_serial ready

[  315.461445] irq 237: nobody cared (try booting with the "irqpoll" option)

[  315.468302] CPU: 0 PID: 397 Comm: syslogd Not tainted 3.12.0-00128-g928c8b1 #2

[  315.475620] [<c00144c8>] (unwind_backtrace+0x0/0xf0) from [<c0011ce4>] (show_stack+0x10/0x14)

[  315.484218] [<c0011ce4>] (show_stack+0x10/0x14) from [<c00513a0>] (__report_bad_irq+0x20/0xc0)

[  315.492883] [<c00513a0>] (__report_bad_irq+0x20/0xc0) from [<c0051848>] (note_interrupt+0x1d4/0x238)

[  315.502060] [<c0051848>] (note_interrupt+0x1d4/0x238) from [<c004fac4>] (handle_irq_event_percpu+0xc4/0x264)

[  315.511928] [<c004fac4>] (handle_irq_event_percpu+0xc4/0x264) from [<c004fca0>] (handle_irq_event+0x3c/0x5c)

[  315.521795] [<c004fca0>] (handle_irq_event+0x3c/0x5c) from [<c0051fd0>] (handle_level_irq+0x8c/0xe8)

[  315.530968] [<c0051fd0>] (handle_level_irq+0x8c/0xe8) from [<c004f358>] (generic_handle_irq+0x20/0x30)

[  315.540316] [<c004f358>] (generic_handle_irq+0x20/0x30) from [<c000fde0>] (handle_IRQ+0x30/0x84)

[  315.549144] [<c000fde0>] (handle_IRQ+0x30/0x84) from [<c0012764>] (__irq_svc+0x44/0x54)

[  315.557198] [<c0012764>] (__irq_svc+0x44/0x54) from [<c0020248>] (__do_softirq+0x90/0x26c)

[  315.565504] [<c0020248>] (__do_softirq+0x90/0x26c) from [<c00204f0>] (do_softirq+0x68/0x70)

[  315.573893] [<c00204f0>] (do_softirq+0x68/0x70) from [<c00207e4>] (irq_exit+0xa4/0xf4)

[  315.581851] [<c00207e4>] (irq_exit+0xa4/0xf4) from [<c000fde4>] (handle_IRQ+0x34/0x84)

[  315.589810] [<c000fde4>] (handle_IRQ+0x34/0x84) from [<c0012764>] (__irq_svc+0x44/0x54)

[  315.597859] [<c0012764>] (__irq_svc+0x44/0x54) from [<c006ee28>] (rcu_sched_qs+0x80/0xb0)

[  315.606093] [<c006ee28>] (rcu_sched_qs+0x80/0xb0) from [<c0466734>] (__schedule+0x28/0x580)

[  315.614492] [<c0466734>] (__schedule+0x28/0x580) from [<c0463f88>] (schedule_timeout+0x128/0x1d0)

[  315.623424] [<c0463f88>] (schedule_timeout+0x128/0x1d0) from [<c03c700c>] (__skb_recv_datagram+0x3cc/0x470)

[  315.633222] [<c03c700c>] (__skb_recv_datagram+0x3cc/0x470) from [<c042e704>] (unix_dgram_recvmsg+0x8c/0x3b8)

[  315.643104] [<c042e704>] (unix_dgram_recvmsg+0x8c/0x3b8) from [<c03ba9e0>] (sock_aio_read+0xdc/0xf8)

[  315.652290] [<c03ba9e0>] (sock_aio_read+0xdc/0xf8) from [<c00cf75c>] (do_sync_read+0x7c/0xa4)

[  315.660862] [<c00cf75c>] (do_sync_read+0x7c/0xa4) from [<c00d03d4>] (vfs_read+0x15c/0x17c)

[  315.669167] [<c00d03d4>] (vfs_read+0x15c/0x17c) from [<c00d0590>] (SyS_read+0x3c/0x70)

[  315.677128] [<c00d0590>] (SyS_read+0x3c/0x70) from [<c000eee0>] (ret_fast_syscall+0x0/0x44)

[  315.685493] handlers:

[  315.687818] [<c0344020>] ci_irq

[  315.690995] Disabling IRQ #237

Do you know I get this kernel panic?

Thanks again.

0 Kudos
Reply

2,872 Views
lategoodbye
Senior Contributor I

To avoid these many insmod calls, just call

modprobe g_serial

0 Kudos
Reply

2,872 Views
fabio_estevam
NXP Employee
NXP Employee

Please try this patch. This should probably fix this problem.

http://marc.info/?l=linux-usb&m=138505258028394&w=2

Regards,

Fabio Estevam

0 Kudos
Reply