Ticket #2178 (new defect)

Opened 10 years ago

Last modified 10 years ago

usb0 configuration doesn't respect usb events

Reported by: vnevoa Owned by: openmoko-kernel
Priority: normal Milestone:
Component: kernel Version: Om2008.9-dev
Severity: normal Keywords: usb0 usb udev
Cc: testing@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible: always

Description

The usb0 network interface is never affected by USB plug-in or unplug (to a PC).

I believe the most correct behavior should be to at least do "ifdown usb0" upon unplugging, and "ifup usb0" upon plugging in.

This is much desired to allow better networking infrastructure, like automatic reconfiguration of NAT from several optional external interfaces (USB / GPRS / WiFi?).

Listening to the udev events while unplugging / plugging in does not show anything related to USB, only to power supply:

udevmonitor will print the received events for:
UDEV the event which udev sends out after rule processing
UEVENT the kernel uevent

# unplug:
UEVENT[949434728.174830] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UDEV  [949434728.188090] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UEVENT[949434728.724675] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UDEV  [949434728.741022] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)

#plug:
UEVENT[949434735.734659] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UDEV  [949434735.747487] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UEVENT[949434736.459851] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UDEV  [949434736.474648] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UEVENT[949434736.784914] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)
UDEV  [949434736.800844] change   /devices/platform/bq27000-battery.0/power_supply/bat (power_supply)

I would expect some kind of USB event in udev... if not, then where else should we get an event?

System data:
# feeds: OM2008 testing.
# uname -a

Linux om-gta02 2.6.24 #1 PREEMPT Wed Dec 10 09:19:15 CST 2008 armv4tl unknown

# opkg list_installed: attached;
# logread: attached.

Attachments

logread.txt (63.5 KB) - added by vnevoa 10 years ago.
Logread
opkg list_installed.txt (45.1 KB) - added by vnevoa 10 years ago.
Installed packages
dmesg.txt (15.4 KB) - added by vnevoa 10 years ago.
dmesg output

Change History

Changed 10 years ago by vnevoa

Logread

Changed 10 years ago by vnevoa

Installed packages

Changed 10 years ago by vnevoa

dmesg output

comment:1 Changed 10 years ago by sushama

  • Cc testing@… added

Yes we see the same problem .
Expect something like that : UDEV [1236221436.149443] add /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0/net/usb0 (net)

Actual: UEVENT[1236247478.371376] change /class/power_supply/usb (power_supply)
UEVENT[1236247478.374888] change /class/power_supply/adapter (power_supply)
UDEV [1236247478.398827] change /class/power_supply/usb (power_supply)
UEVENT[1236247478.406588] change /class/power_supply/ac (power_supply)
UDEV [1236247478.456200] change /class/power_supply/adapter (power_supply)
UDEV [1236247478.493781] change /class/power_supply/ac (power_supply)
UEVENT[1236247481.431420] change /class/power_supply/usb (power_supply)
UDEV [1236247481.457016] change /class/power_supply/usb (power_supply)

Note: See TracTickets for help on using tickets.