]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
pcnet32: fix non-napi packet reception
authorDon Fry <pcnet32@verizon.net>
Wed, 17 Oct 2007 22:59:22 +0000 (15:59 -0700)
committerJeff Garzik <jeff@garzik.org>
Thu, 18 Oct 2007 00:17:34 +0000 (20:17 -0400)
Recent changes to the driver for the new napi API broke the reception
of packets when in non-napi mode.  The initialization of napi.weight
was removed for the non-napi case leaving the value zero.

Tested NAPI and non-NAPI on x86_64.

Signed-off-by: Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/pcnet32.c

index 5f994b5beda17b1d808372df248a70124ab07395..159a64586d00c84c2de2ea684e04b0afde81955f 100644 (file)
@@ -1849,6 +1849,9 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
        lp->mii_if.mdio_read = mdio_read;
        lp->mii_if.mdio_write = mdio_write;
 
+       /* napi.weight is used in both the napi and non-napi cases */
+       lp->napi.weight = lp->rx_ring_size / 2;
+
 #ifdef CONFIG_PCNET32_NAPI
        netif_napi_add(dev, &lp->napi, pcnet32_poll, lp->rx_ring_size / 2);
 #endif