On Tue, Mar 06, 2012 at 01:08:04PM +0100, Gertjan van Wingerde wrote: > On Tue, Mar 6, 2012 at 12:53 PM, Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote: > > On Tue, Mar 06, 2012 at 08:45:21AM +0100, Helmut Schaa wrote: > >> > - if (!rt2x00queue_threshold(entry->queue)) > >> > + if (!rt2x00queue_threshold(entry->queue)) { > >> > + spin_lock_irq(&entry->queue->tx_lock); > >> > rt2x00queue_unpause_queue(entry->queue); > >> > + spin_unlock_irq(&entry->queue->tx_lock); > >> > >> Why do we need to disable interrupts here? spin_lock_bh should > >> be sufficient. > > > > I'm not 100% sure, and I was to lazy to find out, and chose safer > > version. I guess I need to find out now ... Ok, locking with bh is fine. > That is actually a good point of Helmut. In all other cases where the tx_lock > is used we actually use spin_lock and spin_unlock. AFAIK we shouldn't mix > the different spinlock variants, so with this the other uses may have to change > as well. We use this lock only in rt2x00mac_tx (2 times) with bh disabled by generic net or mac80211 layer. And now from txdone in process context (usb) or tasklet (pci), so existing spin_lock function version does not need to be changed. On the meantime, I realized that we should also serialize rt2x00queue_threshold(). I'll post second version of a patch shortly. Stanislaw -- 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