Ticket #2166 (new defect)

Opened 9 years ago

Last modified 9 years ago

USB keyboard breaks after suspend.

Reported by: lysgaard Owned by: openmoko-devel
Priority: normal Milestone:
Component: unknown Version:
Severity: normal Keywords: usb keyboard suspend resume
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

If you plug in an USB keyboard after boot, without suspending in forehand, it works as expected. dmesg reports a new full speed usb hid device etc.
However, if you suspend, it breaks the usb driver or something. No reaction in dmesg what so ever.

How to replicate:
1# boot
2# change to usb host
3# plug in keyboard, -It works.
4# reboot
5# change to usb host
6# suspend and resume
7# plug in keyboard, -Noting happens.

This has effected every distribution and kernel I've tried:
FSO M1/2/3/4, OM 2007, ASU, 2008.8/9
I really need to use a keyboard so this is kinda crucial for me.

Extract of dmesg:
soc-audio soc-audio: starting resume work
soc-audio soc-audio: resume work completed
usb0: no IPv6 routers present
s3c2410: changing usb to host
#Here i plug in the keyboard, nothing happens (This would be step 7 in the descr. above.)
s3c2410: changing usb to device
usb0: no IPv6 routers present

Change History

comment:1 Changed 9 years ago by iknowjoseph

I've suffered this problem too. Although lsusb seems to fix it. Running this after a suspend operation would not enable a usb keyboard to work:

ifconfig usb0 down
echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode
echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode
echo USB-Port is in host-mode now.

but this would:

ifconfig usb0 down
echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode
echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode
lsusb
echo USB-Port is in host-mode now.

comment:2 Changed 9 years ago by lysgaard

Ah! Thank you! That's at least a dirty workaround.
Now we need to find out what lsusb does that fixes the problem.. Hmm.

comment:3 Changed 9 years ago by lindi

I am unable reproduce this bug. Here's what I did:

1) boot andy-tracking b4136a36f31a65d0 with patch for #2240
2) apm -s
3) press power button to resume
4) connected usb keyboard to phone
5) ifconfig usb0 down
6) echo host > find /sys/devices -name usb_mode
7) echo 1 > find /sys/devices -name hostmode
8) hit spacebar on keyboard

and observed
6) [21474688.120000] hub 1-0:1.0: unable to enumerate USB device on port 2
7)
[21474732.560000] usb 1-2: new low speed USB device using s3c-ohci and address 4
[21474732.785000] usb 1-2: New USB device found, idVendor=1241, idProduct=1503
[21474732.790000] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber?=0
[21474732.800000] usb 1-2: Product: USB Keyboard
[21474732.805000] usb 1-2: Manufacturer:
[21474732.835000] usb 1-2: configuration #1 chosen from 1 choice
[21474732.880000] input: USB Keyboard as /class/input/input5
[21474732.930000] generic-usb 0003:1241:1503.0001: input: USB HID v1.10 Keyboard [ USB Keyboard] on usb-s3c24xx-2/input0
[21474732.970000] input: USB Keyboard as /class/input/input6
[21474733.015000] generic-usb 0003:1241:1503.0002: input: USB HID v1.10 Device [ USB Keyboard] on usb-s3c24xx-2/input1
8) space is printed to console

Did you do something differently?

Note: See TracTickets for help on using tickets.