Skip to content

Commit

Permalink
pcnet32: fix non-napi packet reception
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Don Fry authored and Jeff Garzik committed Oct 18, 2007
1 parent e30d422 commit feff348
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/pcnet32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit feff348

Please sign in to comment.