Dear support team,
We are using imx6Q sabresd platform for our development with Linux 3.10.17_1.0.0-GA BSP.
We need to test the USB OTG as a device. For the same we tried to insert the mass storage driver in the kernel. We are not able to test the USB OTG as device.
I have copied the error log here for your reference.
root@imx6qsabresd:~# insmod g_mass_storage.ko file=/dev/mmcblk1p1
g_mass_storage: Unknown symbol usb_interface_id (err 0)
g_mass_storage: Unknown symbol usb_assign_descriptors (err 0)
g_mass_storage: Unknown symbol usb_string_id (err 0)
g_mass_storage: Unknown symbol usb_string_ids_tab (err 0)
g_mass_storage: Unknown symbol usb_composite_unregister (err 0)
g_mass_storage: Unknown symbol config_ep_by_speed (err 0)
g_mass_storage: Unknown symbol usb_add_function (err 0)
g_mass_storage: Unknown symbol usb_composite_probe (err 0)
g_mass_storage: Unknown symbol usb_composite_overwrite_options (err 0)
g_mass_storage: Unknown symbol usb_composite_setup_continue (err 0)
g_mass_storage: Unknown symbol usb_ep_autoconfig (err 0)
g_mass_storage: Unknown symbol usb_add_config (err 0)
g_mass_storage: Unknown symbol usb_free_all_descriptors (err 0)
insmod: ERROR: could not insert module g_mass_storage.ko: Unknown symbol in module
Please help us to test the same. In case, If we do wrong suggest us.
Thank You,
Regards,
Ansari
Solved! Go to Solution.
Hi Igor,
We are able to successfully insert the g_mass_storage.ko file without changing the default kernel configuration (imx_v7_defconfig).
The steps are below
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod fs/configfs/configfs.ko
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod drivers/usb/gadget/libcomposite.ko
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod drivers/usb/gadget/g_mass_storage.ko
Thank You,
Regards,
Ansari
Hi Abdul
I would suggest to check if correct usb connector was used (for Device mode
with ID signal high or float) and look at link below
Issue with USB OTG in device mode with mass storage gadget driver in i.MX6
Best regards
chip
Dear Chip,
Thanks for your input. Please find our test cases as below,
Case1:
======
I downloaded the binaries from the below mentioned link and tested USB OTG as device with this downloaded binaries and result is same.
Commands used to test USB OTG as device:
insmod /lib/modules/3.10.17-1.0.0_ga+g232293e/kernel/drivers/usb/gadget
t/g_mass_storage.ko file=/dev/mmcblk1p2
Case 2:
======
Compile the Linux kernel source code (linux-3.10.17 GA release) using the following commands to generate the binaries.
make imx_v7_defconfig;make;make uImage LOADADDR=0x10800000
Tested the OTG with the generated uImage and module(drivers/usb/gadget/g_mass_storage.ko). The result is same.
Case 3:
======
Checked the below link for this issue but with out any success.
https://community.freescale.com/message/433234#433234
The link suggested for enabling the macro USB_CHIPIDEA_UDC (ChipIdea device controller) which was already enabled.
In addition, We are using imx6Q sabreSD board for testing.
We assume that the driver module (g_mass_storage.ko) can be inserted with out connecting the USB OTG device cable. Here our problem is driver module itself not able to insert.
Please suggest us.
Thank You,
Regards,
Ansari
Hi Abdul
then what is about modprobe, is it working ?
$ modprobe g_mass_storage file=./backing_file
there are unit tests (imx-test-3.10.17-1.0.0) in demo images, it
hold all module tests.
Best regards
chip
Hi Chip,
Thanks for your input.
The below command not giving any error and the mass storage device is not connected to the host PC.
$modprobe g_mass_storage file=/dev/mmcblk1p1
In addition, we are getting below prints when we connect/remove the USB OTG device cable with host PC.
root@imx6qdlsolo:~# max8903-charger max8903.18: USB Charger Connected.
max8903-charger max8903.18: USB Charger Disconnected.
Let us check once with "unit_tests" module test.
Thank You,
Regards,
Ansari
Hi,
We are using a Sabre SD board and try to make the USB Gadget running and we have the same message coming out on the console:
max8903-charger max8903.18: USB Charger Connected.
max8903-charger max8903.18: USB Charger Disconnected.
On the PC connected to the target we have a device detected but after a second we have a disconnected message on "dmesg" and over and over the device gets connected and disconnected on the host PC. During the interval we manage to mount what we exported through USB from the device but we get disconnected.
We also have a sabre Lite board and using the same image (with the appropriate DTB) the problem is not happening.
We are using the last git version of linux 3.10
Any idea where this is coming from and how to solve it ?
Thanks
Bertrand
Hi chip,
We are waiting for your valuable input on this issue.
Thank You,
Regards,
Ansari
what is about settings
CONFIG_USB_CHIPIDEA
CONFIG_USB_GADGET
CONFIG_USB_MXS_PHY
~igor
Hi Igor,
The below configurations are enabled in the Linux kernel by default.
CONFIG_USB_CHIPIDEA
CONFIG_USB_GADGET
CONFIG_USB_MXS_PHY
Thank You,
Regards,
Ansari
Hi Ansari
please check link below
just for example it has build settings as below:
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT = y
what settings below in your build : ?
CONFIG_USB_CHIPIDEA
CONFIG_USB_GADGET
CONFIG_USB_MXS_PHY
~igor
Hi Igor,
We have not changed the Linux kernel source code and the kernel configuration file. we have executed below command to configure the kernel (which is default)
$make imx_v7_defconfig
With this default configuration, find the below settings of the kernel configuration
CONFIG_USB_CHIPIDEA = y
CONFIG_USB_GADGET = y
CONFIG_USB_MXS_PHY = y
Thanks You,
Regards,
Ansari
you can try to change
y --> m
and check
~igor
Hi Igor,
Thanks for your input.
We have changed the configuration as mentioned below. But the result same.
CONFIG_USB_CHIPIDEA = m
CONFIG_USB_GADGET = m
CONFIG_USB_MXS_PHY = m
Please find the command executed and the following error.
root@imx6qsabresd:~#insmod g_mass_sotrage.ko file=/dev/mmcblk1p1
g_mass_storage: Unknown symbol usb_interface_id (err 0)
g_mass_storage: Unknown symbol usb_assign_descriptors (err 0)
g_mass_storage: Unknown symbol usb_string_id (err 0)
g_mass_storage: Unknown symbol usb_string_ids_tab (err 0)
g_mass_storage: Unknown symbol usb_composite_unregister (err 0)
g_mass_storage: Unknown symbol config_ep_by_speed (err 0)
g_mass_storage: Unknown symbol usb_add_function (err 0)
g_mass_storage: Unknown symbol usb_composite_probe (err 0)
g_mass_storage: Unknown symbol usb_composite_overwrite_options (err 0)
g_mass_storage: Unknown symbol usb_composite_setup_continue (err 0)
g_mass_storage: Unknown symbol usb_ep_autoconfig (err 0)
g_mass_storage: Unknown symbol usb_add_config (err 0)
g_mass_storage: Unknown symbol usb_free_all_descriptors (err 0)
insmod: ERROR: could not insert module g_mass_storage.ko: Unknown symbol in module
Thank You,
Regards,
Ansari
Hi Igor,
We are able to successfully insert the g_mass_storage.ko file without changing the default kernel configuration (imx_v7_defconfig).
The steps are below
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod fs/configfs/configfs.ko
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod drivers/usb/gadget/libcomposite.ko
/lib/modules/3.10.17-1.0.0_ga+g2a69800/kernel/$insmod drivers/usb/gadget/g_mass_storage.ko
Thank You,
Regards,
Ansari