From: James Chapman <[EMAIL PROTECTED]>
Date: Mon, 27 Aug 2007 22:03:15 +0100

> Kok, Auke wrote:
> > James Chapman wrote:
> >>      nic = netdev_priv(netdev);
> >> -    netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
> >>      nic->netdev = netdev;
> >>      nic->pdev = pdev;
> >>      nic->msg_enable = (1 << debug) - 1;
> >>      pci_set_drvdata(pdev, netdev);
> >> +    netif_napi_add(netdev, &nic->napi, e100_poll, E100_NAPI_WEIGHT);
> >> +    napi_disable(&nic->napi);
> > 
> > Just wondering, could we even reverse this order? IOW disable NAPI 
> > first, then add it ?
> 
> I think the order shouldn't matter. DaveM?

It doesn't matter.

I'm beginning to think maybe we should do an implicit napi_disable()
in netif_napi_add(), then it's easier for drivers to play nice.

On open you do napi_enable(), in close you do napi_disable().
That's it.

And anywhere else in your driver that you have to napi_disable()
(suspend, recovering from hardware errors, etc.) you must be sure to
do the associated napi_enable() later on in order to keep things
balanced.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to