g_hid unloading issue

cancel
Showing results for 
Search instead for 
Did you mean: 

g_hid unloading issue

540 Views
krunalkhetani
Contributor I

I am trying to test g_hid driver but facing issues while removing g_hid using rmmod

 

root@imx6ulnxpuiopb:~# modprobe g_hid

root@imx6ulnxpuiopb:~# rmmod g_hid

root@imx6ulnxpuiopb:~# modprobe g_hid

Segmentation fault

 

Kernel: Linux imx6ulnxpuiopb 4.1.15-1.2.0+g77f6154 #82 SMP PREEMPT Fri Sep 1 17:24:23 IST 2017 armv7l GNU/Linux

 

I split the loading of modules and I tried following commands, I think insmod in a particular scenario causing this issue.

 

insmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/fs/configfs/configfs.ko

rmmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/fs/configfs/configfs.ko

I tried above commands for 3 times without any problem

 

insmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/libcomposite.ko

rmmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/libcomposite.ko

I tried above commands for 3 times without any problem

 

insmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/function/usb_f_hid.ko

rmmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/function/usb_f_hid.ko

I tried above commands for 3 times without any problem

 

insmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/legacy/g_hid.ko

rmmod /lib/modules/4.1.15-1.2.0+g77f6154/kernel/drivers/usb/gadget/legacy/g_hid.ko

This is problematic part and dumps the core on second attempt.

 

If it would have been a driver issue it should show kernel panic instead its dumping the core.

 

Can anyone please help me on this?

Labels (3)
0 Kudos
1 Reply

192 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Krunal

please refer to sect.39.3.9 Loadable Module Support attached Linux Manual.

Non specific to nxp usb driver issues may be posted on kernel mail list:

Majordomo Lists at VGER.KERNEL.ORG 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------