Messages in this thread |  | | Date | Mon, 13 Nov 2000 20:12:10 -0500 | From | Jeff Garzik <> | Subject | Re: [patch] acenic driver update |
| |
You would think it would be easier to maintain a separate 2.2.x and 2.4.x version of acenic.c at this point :)
Jes Sorensen wrote: > @@ -2307,14 +2337,10 @@ > u32 idx, flagsize; > > /* > - * ARGH, there is just no pretty way to do this > + * This only happens with pre-softnet, ie. 2.2.x kernels. > */ > -#if (LINUX_VERSION_CODE < 0x02032b) > - if (test_and_set_bit(0, &dev->tbusy)) > + if (early_stop_netif_stop_queue(dev)) > return 1; > -#else > - netif_stop_queue(dev); > -#endif > > idx = ap->tx_prd; > > @@ -2358,7 +2384,8 @@ > */ > mod_timer(&ap->timer, jiffies + (3 * HZ)); > > - /* The following check will fix a race between the interrupt > + /* > + * The following check will fix a race between the interrupt > * handler increasing the tx_ret_csm and testing for tx_full > * and this tx routine's testing the tx_ret_csm and setting > * the tx_full; note that this fix makes assumptions on the > @@ -2369,13 +2396,17 @@ > if (((idx + 2) % TX_RING_ENTRIES != ap->tx_ret_csm) > && xchg(&ap->tx_full, 0)) { > del_timer(&ap->timer); > + /* > + * We may not need this one in the post softnet era > + * in this case this can be changed to a > + * early_stop_netif_wake_queue(dev); > + */ > netif_wake_queue(dev);
nope, you don't need that. if you are start_xmit, and you didn't stop the queue yourself, there's no need to start it, and definitely no need to wake...
you can probably remove 'tx_full' as well, as it is usually redundant to tbusy/netif_{start,stop}_queue.
Jeff
-- Jeff Garzik | Building 1024 | The chief enemy of creativity is "good" sense MandrakeSoft | -- Picasso - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |