Hi, [Extended CC list with linux-wireless and Johannes Berg] > CentOS 5.1, running with latest GIT kernel, rt2500usb, full dmesg > output follows. > > This is using NetworkManager to get things done. > > The "BUG: scheduling while atomic: rt2500usb/3817/0x00000002" thing > appears right after plugging in the stick. I found the cause of this problem, rt2500usb and rt73usb require scheduled register access, this is a known fact, that is the reason why things like ERP and Beacon configuration which are per-interface settings are done within a workqueue. However, this is where the problem starts, in the workqueue rt2x00 needs to iterate over all interfaces, because for each interface the configuration routine must be run. But to iterate over all interfaces, mac80211 grabs the rcu lock guaranteeing rt2x00 can no longer perform any register access even though it is running in a workqueue. For the ERP configuration we might work around this by storing the ERP settings in a temporary location and change the setting to something that matches most active interfaces best. This means that slot time and preamble settings will always be short when at least 1 interface has it set to short. The real problem is with beaconing, the only way we could get around this issue is creating a local skb in which we store the beacons given to us, and after all iterations are over, write the beacons one by one to the hardware. Obviously this results in race conditions where the beacon might be written to the hardware while the interface is being removed... Which would mean we could end up having to cripple rt2x00 again and remove all support for virtual interfaces... :S Johannes, do you have any suggestions? Ivo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html