From: Carlos M. <car...@gm...> - 2005-09-01 18:27:47
|
On 01/09/05, Andreas Mohr <an...@us...> wrote: > Hi, >=20 > On Thu, Sep 01, 2005 at 03:54:28PM +0300, Denis Vlasenko wrote: > > Those rtnl locks looked bogus to me also. > Hmm, there wasn't much docu about them, I think. > I simply added them where I thought they might be required. And I changed them to a function that does it for you. The cycle is complet= e. ;) > > Should they be removed here also? And why we check > > if (!acx_queue_stopped(priv->netdev)) ? Either comment why or delete... >=20 > If you don't have that check the stop function will log the stopping agai= n > even though it has already been stopped... > (one could perhaps move the acx_queue_stopped() check into the stopping > function, though) >=20 > > BTW patch applied, thanks. > Dito! I always thought that was with two 't's ;) Anyway. Here are two patches. The first one deletes the check from the USB disconnect function and adds a comment about rntl_{,un}lock(). The second one adds the netif_queue_stopped() check to the acx_stop_queue() function. Now all we have to do is see where else that is used and take the check out as well. The problem with the second patch is that acx_stop_queue() is no longer atomic, but instead has two atomic operations in it. More on that later. These apply instead of what I sent earlier. They are compile-tested. And a bit more about those locks. Since we're telling the system to stop giving us anything else, we don't really care if someone managed to add something to it, right? The same way I don't think making acx_stop_queue() non-atomic hurts us because we just don't care. Your thoughts? cmn --=20 Carlos Mart=EDn http://www.cmartin.tk http://rpgscript.berlios.de "Vacate your oddly-shaped office and leave. The revolution is coming." |