Re: error when rmmod g_file_storage module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



by the way, I use the Linux2.6.26
 
 
2008-12-04

snoppy1314

发件人: snoppy1314
发送时间: 2008-12-03  21:27:43
收件人: kernelnewbies
抄送:
主题: error when rmmod g_file_storage module
Hi, eveyone:
 
1. These days I'm trying to make my 2440 board(its CPU is s3c2440) to be notified as a disk of PC when connecting a usb line.
Now nearly everyone is ok.but when I want to rmmod the g_file_storage module,error happened.
#rmmod  g_file_storage
After I execute the last command, the board is dead, and a few minutes later, the information below is showed:

INFO: task rmmod:850 blocked for more than 120 seconds.

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

rmmod         D c01f7284     0   850    807

[<c01f7018>] (__sched_text_start+0x0/0x2c0) from [<c01f7814>] (schedule_timeout+0x24/0xbc)

[<c01f77f0>] (schedule_timeout+0x0/0xbc) from [<c01f73fc>] (wait_for_common+0x124/0x1bc)

 r8:00000880 r7:00000002 r6:c1c8013c r5:7fffffff r4:c1fe5edc

[<c01f72d8>] (wait_for_common+0x0/0x1bc) from [<c01f74ac>] (wait_for_completion+0x18/0x1c)

 r7:c1fe5f48 r6:c1fe4000 r5:00000000 r4:c1c800a0

[<c01f7494>] (wait_for_completion+0x0/0x1c) from [<bf00a8a0>] (fsg_cleanup+0x44/0x68 [g_file_storage])

[<bf00a85c>] (fsg_cleanup+0x0/0x68 [g_file_storage]) from [<c005cc98>] (sys_delete_module+0x1a0/0x1f0)

 r4:bf00cdc0

[<c005caf8>] (sys_delete_module+0x0/0x1f0) from [<c0024ae0>] (ret_fast_syscall+0x0/0x2c)

 r8:c0024c84 r7:00000081 r6:00098ebe r5:bebc6e84 r4:0000015e

 

 

who can help me?Thanks

 

NOw i know the problem is in the below function:

\drivers\usb\gadget\file_storage.c

static void __exit fsg_cleanup(void)
{
 struct fsg_dev *fsg = the_fsg;

 /* Unregister the driver iff the thread hasn't already done so */
 if (test_and_clear_bit(REGISTERED, &fsg->atomic_bitflags))
  usb_gadget_unregister_driver(&fsg_driver);

 /* Wait for the thread to finish up */
 wait_for_completion(&fsg->thread_notifier);

 close_all_backing_files(fsg);
 kref_put(&fsg->ref, fsg_release);
}

 

2. what i do is as below:

cd /mnt/yaffs
        dd if=/dev/zero of=img bs=1k count=2k
        mkdosfs -v -F 16 -n fatdisk img
        insmod /mnt/yaffs/sikinzen/s3c2410_udc.ko
        insmod /mnt/yaffs/sikinzen/g_file_storage.ko file=img stall=0 removable=1

now connect the usb line between PC and 2440 board , and you will find a disk in PC

 

the above two modules is compiled from the Linux source \drivers\usb\gadget

 
2008-12-03

snoppy1314

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux