kernel: bump 4.9 to 4.9.208
[openwrt/staging/mkresin.git] / target / linux / generic / backport-4.9 / 090-net-generalize-napi_complete_done.patch
index 20e7ae06541335ef1095d1fd4ec883a422aba999..433788e07570e95554eac2effd3b8033828cebf3 100644 (file)
@@ -137,7 +137,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
 --- a/drivers/net/can/c_can/c_can.c
 +++ b/drivers/net/can/c_can/c_can.c
-@@ -1070,7 +1070,7 @@ static int c_can_poll(struct napi_struct
+@@ -1105,7 +1105,7 @@ static int c_can_poll(struct napi_struct
  
  end:
        if (work_done < quota) {
@@ -313,7 +313,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        }
 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
 +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
-@@ -1532,7 +1532,7 @@ static int atl1e_clean(struct napi_struc
+@@ -1534,7 +1534,7 @@ static int atl1e_clean(struct napi_struc
        /* If no Tx and not enough Rx work done, exit the polling mode */
        if (work_done < budget) {
  quit_polling:
@@ -388,7 +388,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                                        BNX2_PCICFG_INT_ACK_CMD_INDEX_VALID |
 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
 +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
-@@ -3236,7 +3236,7 @@ static int bnx2x_poll(struct napi_struct
+@@ -3240,7 +3240,7 @@ static int bnx2x_poll(struct napi_struct
                 * has been updated when NAPI was scheduled.
                 */
                if (IS_FCOE_FP(fp)) {
@@ -399,7 +399,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                        /* bnx2x_has_rx_work() reads the status block,
 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
 +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
-@@ -1781,7 +1781,7 @@ static int bnxt_poll_nitroa0(struct napi
+@@ -1799,7 +1799,7 @@ static int bnxt_poll_nitroa0(struct napi
        }
  
        if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) {
@@ -476,7 +476,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        octeon_mgmt_update_rx_stats(netdev);
 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c
 +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c
-@@ -737,7 +737,7 @@ static int nicvf_poll(struct napi_struct
+@@ -748,7 +748,7 @@ static int nicvf_poll(struct napi_struct
  
        if (work_done < budget) {
                /* Slow packet rate, exit polling */
@@ -668,15 +668,15 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c
 +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
-@@ -555,7 +555,7 @@ refill:
+@@ -561,7 +561,7 @@ refill:
                priv->reg_inten |= RCV_INT;
                writel_relaxed(priv->reg_inten, priv->base + PPE_INTEN);
        }
 -      napi_complete(napi);
 +      napi_complete_done(napi, rx);
  done:
-       /* clean up tx descriptors and start a new timer if necessary */
-       tx_remaining = hip04_tx_reclaim(ndev, false);
+       /* start a new timer if necessary */
+       if (rx < budget && tx_remaining)
 --- a/drivers/net/ethernet/hisilicon/hisi_femac.c
 +++ b/drivers/net/ethernet/hisilicon/hisi_femac.c
 @@ -330,7 +330,7 @@ static int hisi_femac_poll(struct napi_s
@@ -701,7 +701,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
 --- a/drivers/net/ethernet/ibm/ibmveth.c
 +++ b/drivers/net/ethernet/ibm/ibmveth.c
-@@ -1324,7 +1324,7 @@ restart_poll:
+@@ -1323,7 +1323,7 @@ static int ibmveth_poll(struct napi_stru
        ibmveth_replenish_task(adapter);
  
        if (frames_processed < budget) {
@@ -819,7 +819,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
  
 --- a/drivers/net/ethernet/marvell/mvpp2.c
 +++ b/drivers/net/ethernet/marvell/mvpp2.c
-@@ -5406,7 +5406,7 @@ static int mvpp2_poll(struct napi_struct
+@@ -5404,7 +5404,7 @@ static int mvpp2_poll(struct napi_struct
  
        if (budget > 0) {
                cause_rx = 0;
@@ -1095,7 +1095,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                dma_intr_ena = smsc9420_reg_read(pd, DMAC_INTR_ENA);
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -2706,7 +2706,7 @@ static int stmmac_poll(struct napi_struc
+@@ -2700,7 +2700,7 @@ static int stmmac_poll(struct napi_struc
  
        work_done = stmmac_rx(priv, budget);
        if (work_done < budget) {
@@ -1150,7 +1150,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        return work_done;
 --- a/drivers/net/ethernet/ti/cpsw.c
 +++ b/drivers/net/ethernet/ti/cpsw.c
-@@ -843,7 +843,7 @@ static int cpsw_rx_poll(struct napi_stru
+@@ -844,7 +844,7 @@ static int cpsw_rx_poll(struct napi_stru
        }
  
        if (num_rx < budget) {
@@ -1227,7 +1227,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        }
 --- a/drivers/net/ethernet/toshiba/tc35815.c
 +++ b/drivers/net/ethernet/toshiba/tc35815.c
-@@ -1639,7 +1639,7 @@ static int tc35815_poll(struct napi_stru
+@@ -1641,7 +1641,7 @@ static int tc35815_poll(struct napi_stru
        spin_unlock(&lp->rx_lock);
  
        if (received < budget) {
@@ -1238,7 +1238,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        }
 --- a/drivers/net/ethernet/tundra/tsi108_eth.c
 +++ b/drivers/net/ethernet/tundra/tsi108_eth.c
-@@ -887,7 +887,7 @@ static int tsi108_poll(struct napi_struc
+@@ -888,7 +888,7 @@ static int tsi108_poll(struct napi_struc
  
        if (num_received < budget) {
                data->rxpending = 0;
@@ -1293,7 +1293,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
        }
 --- a/drivers/net/fjes/fjes_main.c
 +++ b/drivers/net/fjes/fjes_main.c
-@@ -1122,7 +1122,7 @@ static int fjes_poll(struct napi_struct
+@@ -1125,7 +1125,7 @@ static int fjes_poll(struct napi_struct
        }
  
        if (work_done < budget) {
@@ -1379,7 +1379,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
                 */
 --- a/drivers/net/xen-netfront.c
 +++ b/drivers/net/xen-netfront.c
-@@ -1070,7 +1070,7 @@ err:
+@@ -1071,7 +1071,7 @@ err:
        if (work_done < budget) {
                int more_to_do = 0;