Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to load after suspend/ resume #1

Open
paroj opened this issue Jul 3, 2015 · 4 comments
Open

fails to load after suspend/ resume #1

paroj opened this issue Jul 3, 2015 · 4 comments

Comments

@paroj
Copy link

paroj commented Jul 3, 2015

when trying to load the driver after suspend/ resume:

[  960.451015] INFO: task insmod:3260 blocked for more than 120 seconds.
[  960.451018]       Tainted: P           OE  3.19.0-22-generic #22~14.04.1-Ubuntu
[  960.451019] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  960.451020] insmod          D ffff8803d3847918     0  3260   3259 0x00000004
[  960.451022]  ffff8803d3847918 ffff880407170000 0000000000013e80 ffff8803d3847fd8
[  960.451024]  0000000000013e80 ffff88040b6d9d70 ffff880407170000 ffff8803d38479c8
[  960.451025]  ffff8803d3847a68 7fffffffffffffff ffff8803d3847a60 ffff880407170000
[  960.451026] Call Trace:
[  960.451031]  [<ffffffff817b1ec9>] schedule+0x29/0x70
[  960.451033]  [<ffffffff817b4f8c>] schedule_timeout+0x20c/0x280
[  960.451036]  [<ffffffff815eaf9d>] ? xhci_urb_enqueue+0x25d/0x650
[  960.451039]  [<ffffffff815a8436>] ? usb_hcd_map_urb_for_dma+0x476/0x500
[  960.451040]  [<ffffffff817b2d64>] wait_for_completion_timeout+0xa4/0x180
[  960.451042]  [<ffffffff810a0db0>] ? wake_up_state+0x20/0x20
[  960.451044]  [<ffffffff815abf8d>] usb_start_wait_urb+0x7d/0x150
[  960.451047]  [<ffffffff811cf9d5>] ? __kmalloc+0x1c5/0x280
[  960.451048]  [<ffffffff815aaece>] ? usb_alloc_urb+0x1e/0x50
[  960.451049]  [<ffffffff815ac4f1>] usb_bulk_msg+0xc1/0x180
[  960.451051]  [<ffffffff815ac5be>] usb_interrupt_msg+0xe/0x10
[  960.451053]  [<ffffffffc062c3d0>] xbox360wr_probe+0x1d0/0x260 [xbox360wr]
[  960.451055]  [<ffffffff815b07ab>] usb_probe_interface+0x1bb/0x300
[  960.451058]  [<ffffffff814f522d>] driver_probe_device+0x12d/0x3e0
[  960.451060]  [<ffffffff814f55bb>] __driver_attach+0x9b/0xa0
[  960.451061]  [<ffffffff814f5520>] ? __device_attach+0x40/0x40
[  960.451063]  [<ffffffff814f3133>] bus_for_each_dev+0x63/0xa0
[  960.451064]  [<ffffffff814f4c0e>] driver_attach+0x1e/0x20
[  960.451066]  [<ffffffff814f4800>] bus_add_driver+0x180/0x240
[  960.451067]  [<ffffffff814f5da4>] driver_register+0x64/0xf0
[  960.451069]  [<ffffffff815aef72>] usb_register_driver+0x82/0x160
[  960.451081]  [<ffffffffc0178000>] ? 0xffffffffc0178000
[  960.451082]  [<ffffffffc017801e>] xbox360wr_usb_driver_init+0x1e/0x1000 [xbox360wr]
[  960.451085]  [<ffffffff81002144>] do_one_initcall+0xd4/0x210

the same error also exists in the orginal xpad codebase:
paroj/xpad#6

can you reproduce this? or is it just my kernel/ hardware combination?

@computerquip
Copy link
Owner

Probably... I never really handled resume/suspend. I had enough issues just getting the damn thing to work how I wanted. It still doesn't work correctly whenever you unload the module (although, I feel this is partially due to the fault of how unclear the Linux kernel interface is when letting it automatically unload the USB module).

Although, this should be fixed to at least the point of not causing issues. Thinks for reminding me.

@computerquip
Copy link
Owner

By the way, I've not tried that. Does the driver not do anything or does it work despite giving that message?

@paroj
Copy link
Author

paroj commented Jul 5, 2015

for testing I set a timeout of 500ms for usb_interrupt_msg (a good workaround?). Now it correctly times out with:
[11522.629382] Error during submission.Error code: -110 - Actual Length 0
instead of insmod blocking for 2 minutes.

obviously LED submission (and probably FF) did not work, but the input device is created and works.

I also found out that plugging the receiver in and out solves the issue. So I guess this has something to do with the Linux USB interface.

@computerquip
Copy link
Owner

I'd imagine we can kill the recieving urb on suspend and start it back up on resume. That's probably the most appropriate. I'm working on getting a virtual machine running again...

EDIT: We also need to set the LED appropriately as if the computer shut off, then make sure no urbs are active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants