netdev
[Top] [All Lists]

8139cp NAPI race?

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: 8139cp NAPI race?
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Fri, 17 Oct 2003 10:26:22 -0700
Cc: netdev@xxxxxxxxxxx
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
If I read the documentation (and other drivers) the two lines
in 8139cp.c look backwards:

static int cp_rx_poll (struct net_device *dev, int *budget)
{
...
        /* if we did not reach work limit, then we're done with
         * this round of polling
         */
        if (rx_work) {
                if (cpr16(IntrStatus) & cp_rx_intr_mask)
                        goto rx_status_loop;

<1>             cpw16_f(IntrMask, cp_intr_mask);   
<2>             netif_rx_complete(dev);

                return 0;       /* done */
        }

Isn't re-enable supposed to be after rx_complete to avoid races.

<Prev in Thread] Current Thread [Next in Thread>
  • 8139cp NAPI race?, Stephen Hemminger <=