]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/niu.c
Merge branch 'master' of git://git.infradead.org/users/dedekind/mtd-tests-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / niu.c
index 671721c8ca65b5d1515a9868c5c5a26d7cb137dd..0c0b752315cae844c6944b912d8605032070e93c 100644 (file)
@@ -3618,7 +3618,9 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
 
        nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat);
 
-       niu_sync_rx_discard_stats(np, rp, 0x7FFF);
+       /* Only sync discards stats when qlen indicate potential for drops */
+       if (qlen > 10)
+               niu_sync_rx_discard_stats(np, rp, 0x7FFF);
 
        return work_done;
 }
@@ -3667,7 +3669,7 @@ static int niu_poll(struct napi_struct *napi, int budget)
        work_done = niu_poll_core(np, lp, budget);
 
        if (work_done < budget) {
-               netif_rx_complete(np->dev, napi);
+               netif_rx_complete(napi);
                niu_ldg_rearm(np, lp, 1);
        }
        return work_done;
@@ -4086,12 +4088,12 @@ static void __niu_fastpath_interrupt(struct niu *np, int ldg, u64 v0)
 static void niu_schedule_napi(struct niu *np, struct niu_ldg *lp,
                              u64 v0, u64 v1, u64 v2)
 {
-       if (likely(netif_rx_schedule_prep(np->dev, &lp->napi))) {
+       if (likely(netif_rx_schedule_prep(&lp->napi))) {
                lp->v0 = v0;
                lp->v1 = v1;
                lp->v2 = v2;
                __niu_fastpath_interrupt(np, lp->ldg_num, v0);
-               __netif_rx_schedule(np->dev, &lp->napi);
+               __netif_rx_schedule(&lp->napi);
        }
 }
 
@@ -8904,7 +8906,7 @@ static u64 niu_pci_map_page(struct device *dev, struct page *page,
 static void niu_pci_unmap_page(struct device *dev, u64 dma_address,
                               size_t size, enum dma_data_direction direction)
 {
-       return dma_unmap_page(dev, dma_address, size, direction);
+       dma_unmap_page(dev, dma_address, size, direction);
 }
 
 static u64 niu_pci_map_single(struct device *dev, void *cpu_addr,