Bug 42632

Summary: Realtek rtl8192se hangs on boot - udev reports worker timeout
Product: Drivers Reporter: Frank (twelve.eighty)
Component: network-wirelessAssignee: Larry Finger (Larry.Finger)
Status: RESOLVED CODE_FIX    
Severity: normal CC: florian, Larry.Finger, linville
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.2.1-1 Subsystem:
Regression: No Bisected commit-id:
Attachments: Test patch to load firmware asynchronourly

Description Frank 2012-01-22 19:11:50 UTC
When booting, udev hangs for 30 seconds until it finally times out trying to load the rtl8192se driver.

From boot log:

Sat Jan 21 09:03:27 2012: udevd[149]: worker [179] timeout, kill it
Sat Jan 21 09:03:27 2012: udevd[149]: seq 1386 '/devices/pci0000:00/0000:00:1c.1/0000:07:00.0' killed
Sat Jan 21 09:03:27 2012: udevd[149]: worker [179] terminated by signal 9 (Killed)

From lspci:

07:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8191SEvB Wireless LAN Controller (rev 10)
0c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)

There is a thread on the ArchLinux Forums (https://bbs.archlinux.org/viewtopic.php?id=134012) where multiple people have reported this problem, with other Realtek drivers as well.

Wise people on the forum are suggesting that, starting with udev-177, "a firmware event that is the child of a module event (which is the case that is causing us problems) is only served once the parent event has finished". 

On ArchLinux, there is a workaround: adding rtl8192se to the MODULES section of rc.conf.
Comment 1 Larry Finger 2012-01-26 17:06:30 UTC
The problem is known, and due to a combination of changes to udev, and the fact that rtl8192se uses synchronous firmware loading.

A patch to switch all the rtlwifi drivers to asynchronous firmware loading has passed the initial RFC review and is undergoing final testing. All is working except for the cleanup when the required firmware is not available. As soon as the patch is ready, it will be sent to wireless-testing, and a copy will be posted here.
Comment 2 Larry Finger 2012-01-27 19:30:24 UTC
Created attachment 72213 [details]
Test patch to load firmware asynchronourly

This patch should work with the mainline git tree.
Comment 3 Florian Mickler 2012-04-04 15:00:22 UTC
A patch referencing this bug report has been merged in Linux v3.4-rc1:

commit b0302aba812bcc39291cdab9ad7e37008f352a91
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Mon Jan 30 09:54:49 2012 -0600

    rtlwifi: Convert to asynchronous firmware load
Comment 4 Florian Mickler 2012-04-04 15:55:39 UTC
A patch referencing a commit referencing this bug report has been merged in Linux v3.4-rc1:

commit 3eda95de19e1781612091869e866a5014257f462
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Tue Jan 31 10:29:22 2012 -0600

    rtlwifi: Remove extra debugging message accidentally left in