Bug 1375 - (int-86367) g_ether.ko disconnect crash
(int-86367)
: g_ether.ko disconnect crash
Status: RESOLVED FIXED
Product: Core
Kernel
: 4.1 (4.2008.23-14)
: All Maemo
: Medium critical with 1 vote (vote)
: 4.1.3
Assigned To: unassigned
: linux-kernel-bugs
:
: crash
:
:
  Show dependency tree
 
Reported: 2007-05-10 07:00 UTC by Volker Braun
Modified: 2008-12-30 16:10 UTC (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Volker Braun (reporter) 2007-05-10 07:00:57 UTC
After using USB networking (g_ether.ko on the n800, usbnet.ko + cdc_ether.ko +
rndis_host.ko on the PC) the g_ether.ko on the n800 does not unload cleanly.
The following sequence of commands reliably crashes the n800 (running
3.2007.10-7).

-------------- snip on -----------------
BusyBox v1.1.3 (Debian 3:1.1.3-3.sdk3) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N800-10:~# lsmod
Module                  Size  Used by
g_file_storage 24456 0 - Live 0xbf04f000
cx3110x 50632 0 - Live 0xbf041000
umac 258372 1 cx3110x, Live 0xbf000000
Nokia-N800-10:~# rmmod g_file_storage
Nokia-N800-10:~# insmod /mnt/initfs/lib/modules/2.6.18-omap1/g_ether.ko
-------------- snip off -----------------

Now connect to host via USB cable, and then disconnect cable again.

-------------- snip on -----------------
Nokia-N800-10:~# dmesg | tail -10
[ 8875.419952] musb_stage0_irq 530: BUS RESET
[ 8875.535491] musb_stage0_irq 530: BUS RESET
[ 8875.664367] musb_hdrc periph: enabled ep2in for int IN, dma, maxpacket 16
[ 8875.664459] usb0: high speed config #1: 100 mA, Ethernet Gadget, using CDC
Ethernet
[ 8875.665191] musb_hdrc periph: enabled ep1in for bulk IN, dma, maxpacket 512
[ 8875.665252] musb_hdrc periph: enabled ep1out for bulk OUT, dma, maxpacket
512
[ 8875.665313] musb_hdrc periph: enabled ep2in for int IN, dma, maxpacket 16
[ 8875.919738] usb_gadget_register_driver 1751: musb_hdrc is already bound to
ether
[ 8906.202667] musb_stage2_irq 628: SUSPEND, devctl 91
[ 8906.469482] musb_stage2_irq 609: DISCONNECT as PERIPHERAL, devctl 88
Nokia-N800-10:~# rmmod g_ether.ko
Nokia-N800-10:~# ifconfig -a
-------------- snip off -----------------

ifconfig does not return anything, and the n800 is completely stopped. No
buttons work, tap to screen does nothing. After a few seconds the n800
automatically reboots.
Comment 1 Kimmo Hämäläinen nokia 2007-09-25 09:52:51 UTC
kernel module issue?
Comment 2 Eero Tamminen nokia 2008-06-10 17:06:04 UTC
(In reply to comment #0)
> Nokia-N800-10:~# insmod /mnt/initfs/lib/modules/2.6.18-omap1/g_ether.ko

In Diablo:
insmod /mnt/initfs/lib/modules/2.6.21-omap1/g_ether.ko


> Nokia-N800-10:~# ifconfig -a
> 
> ifconfig does not return anything, and the n800 is completely stopped. No
> buttons work, tap to screen does nothing. After a few seconds the n800
> automatically reboots.

This bug is still reproducible in Diablo, as NB#86367 (there have
been some other bugs&fixes to USB networking kernel issues in earlier
releases though.)

I think it's a kernel bug, but the cause in Diablo is actually ke-recv
package (which was recently open sourced).  When the USB cable
is connected, it insmods g_file_storage unconditionally and
kernel doesn't like it.

As a workaround, you could modify /usr/sbin/osso-usb-mass-storage-*.sh
to check whether g_ether is present like /etc/init.d/ke-recv does.
Comment 3 Eero Tamminen nokia 2008-09-30 16:07:56 UTC
This will be fixed in next release.

If you do lots of rmmods and insmods for g_ether and g_file_storage, rmmod for
latter can at some point still fail (gets stuck at unloading stage), but device
doesn't freeze nor reboot and ifconfig works fine.
Comment 4 Andre Klapper maemo.org 2008-10-07 16:03:43 UTC
Fixed in internal build version
Diablo x.2008.39-x 

Any public update released with or after this build version will include the
fix.
Please verify that the new version fixes the bug by marking this bug report as
VERIFIED after the public update has been released and if you have some time.
Comment 5 Andre Klapper maemo.org 2008-12-17 20:21:00 UTC
Fix for this should be included in today's 5.2008.43-7 SSU update.
Please verify the fix by marking this bug report as VERIFIED if you have some
time.
Comment 6 james knight 2008-12-18 20:26:22 UTC
please note that this issue is still being discussed in bug #1375, and if it's
been fixed in the SSU then i must have downloaded the wrong thing.  i don't
know enough about ke-recv to understand where all of this is being configured,
but as far as i can tell it is now essential that someone sits down and
properly maps out  what should happen when in all _three_ of the available (and
otherwise perfectly functional) USB modes.

in short - i'd be delighted if someone can correct me, but as far as i can tell
it is NOT fixed yet.
Comment 7 Eero Tamminen nokia 2008-12-30 16:10:20 UTC
(In reply to comment #6)
> please note that this issue is still being discussed in bug #1375,

This bug is bug 1375?


> and if it's been fixed in the SSU then i must have downloaded the wrong 
> thing.

Do you mean that your device still freezes and/or reboots with the steps listed
in the original bug report?

If the device doesn't reboot, it's not the same bug.  If you can trigger the
reboot with slightly different steps, please list them here (unless they're
already listed in some other bug).